Searching \ for '12c508a' 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/index.htm?key=12c508a
Search entire site for: '12c508a'.

Truncated match.
PICList Thread
'12c508a'
1999\10\01@174115 by Kev Howard

picon face
Hello all!

Will a program end (until power is disconnected and re-applied )
for example:

   call    _200ms delay
   bcf gpio,2  ;The program ends  here, the next time the program should run
is when power (which may be applied for up to 20 hours) is disconnected and
re-applied

(gpios, no wake up, no pullup)

Should I put the pic into sleep after bcf gpio,2 ? or will the pic stop until
reset ?
should I fill any unused locations? if so how?

Using picstart plus firmware1.5

" read the books, now I am learning"

come back AC128'S and EL34'S <G>

Thanks in advance!

Kev

1999\10\01@180417 by Alice Campbell

flavicon
face
hello kev,

you can use the mclr switch as a sort of an interrupt that will not
force a cold boot but it means you cant also use a low battery reset,
i think.  it requires setting some flags to detect the sleeping
condition so that the mclr wakeup is processed correctly.  this is a
bit tricky to get to work.

IIRC, the 12c508s go to the origin both after sleep and after an
mclr event, so the parsing routine has to be there.

alice

{Quote hidden}

1999\10\01@191316 by paulb

flavicon
face
Kev Howard wrote:

> Should I put the pic into sleep after bcf gpio,2?  or will the pic
> stop until reset?

 The PIC stops when you tell it to (by a SLEEP).  Un-programmed
locations execute a code which does nothing in particular, and the PC
loops around to the start, so if you simply stop placing instructions
at the end of your code it goes right on and restarts the whole program.

  And again...   And again...   And again...   And again...

 Unsuspecting programmers writing programs they think are looping often
get tricked by the thing looping, but not doing *quite* what they
expected.

> should I fill any unused locations? if so how?

 No.  If you tell it to SLEEP, it does, and what follows has no effect.
--
 Cheers,
       Paul B.

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