Searching \ for '[PIC]: F84 does fine episode ii: the attack of the' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'F84 does fine episode ii: the attack of the'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: F84 does fine episode ii: the attack of the'
2002\09\13@103114 by -8859-1?Q?Hern=E1n_Freschi?=

flavicon
face
Hello everyone. The code I used for my previous post was designed for
C54 (read microchip’s an590), but I also made another program, that
doesn’t work either: it enables all outputs for 6 hours and disables
them for 18:


I didn’t add “ORG 0” before this and “ORG 1FF, GOTO SETUP” at the end.
Could THAT be the problem? Doesn’t the processor cycle the program? Or
does it stop the execution at the end of the program? Does the
oscillator stop at that time? If so, is there a way to add that last
line to an already programmed pic? (I’m asking that because they are now
REALLY expensive in my country – Argentina).


APAGADO equ 0x00

ENCENDIDO equ 0xff


           cblock 0x0D

           d1

           d2

           d3

           d4

           d5

           d6

           endc


SETUP movlw 0x00      
           tris PORTA

           tris PORTB                  
           clrf PORTA

           clrf PORTB


INICIO   movlw ENCENDIDO

           movwf PORTA

           movwf PORTB

           call delay6

           movlw APAGADO

           movwf PORTA

           movwf PORTB

           call delay18

           goto INICIO


delay6 and delay18 are standard delays (generated by the code generator
on piclist.com)

Thanks in advance.


--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2002\09\13@112337 by Wouter van Ooijen

face picon face
> I didn't add "ORG 0" before this and "ORG 1FF, GOTO SETUP" at the end.
> Could THAT be the problem? Doesn't the processor cycle the program? Or
> does it stop the execution at the end of the program? Does the
> oscillator stop at that time? If so, is there a way to add that last
> line to an already programmed pic? (I'm asking that because
> they are now REALLY expensive in my country - Argentina).

A microcontroller program has no end - your code might end, but the
processor will just continue executing instructions. And if you code in
assembler, there are only instructions that you put there. PICs start
executing either at 0000 or (those with calibration constants) at 'top
of ROM'. In most cases 'running past the end of your program' will cause
the CPU to execute a long list of '3FFF's, untill it wraps around to
address 0000, where your program starts again. But it is bad practice to
rely on this.

Bottom line: your program should contain at least one loop that will
loop forever.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...