Copying the temporary values from ram and writing to eeprom memory for data access after the power is lost..
working is as follows :
if pinc.0 is high , interrupt occurs
then the output pinb.0 is high
and it stays high for max 1sec..
Counter is incremented in variable b1
and output b.0 is low.
code :
i want to copy this temporary variable data ( b1) to eeprom main memory for data access after the power is resets..
thanks
working is as follows :
if pinc.0 is high , interrupt occurs
then the output pinb.0 is high
and it stays high for max 1sec..
Counter is incremented in variable b1
and output b.0 is low.
code :
Code:
setint %00000010,%00000010 ; interrupt occur when pinc.1 goes high
main:
goto main
interrupt: ;interrupt occur
high b.0 ; high output pin b.0
pause 1000 ; pause for 1 sec to release the pinc.1
inc b1 ; counter is increment and saved in varible b1
low b.0 ; low ouput b.0
setint %00000010,%00000010 ; restart the interrupt
return
thanks