Re: Status after @ SLEEP Command
Hi Bert,
Actually, there is no interrupt routine.
And I can not use DTs instant int. routine because the pic is almost full.
No more space.
I am using 16F628A.
there is a button on RB0.
PIC is always in sleep using @ SLEEP
When the pin goes high, PIC turns on LCD (LCD Vdd pin is connected to PIC pin, draws 2mA).
All works ok with DTs routine.
But, since I onlly need to wake up the PIC, DTs routine is too much to use for code saving purposes.
So I use the traditional way.
Code:
OPTION_REG.6 = 1 ' Int on rising edge.
INTCON = %00010000
IntFlag VAR INTCON.1
Using intflag here, system wakes up ok.
Turns on LCD ok.
But what on LCD is not correct.
random things.
Again, all works ok with DTs.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks