Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pic 12683 problem loss data

Status
Not open for further replies.

koky

Full Member level 2
Joined
May 12, 2001
Messages
145
Helped
11
Reputation
22
Reaction score
8
Trophy points
1,298
Location
Italy
Activity points
1,097
pic12683

I have make a crepuscolar timer ( 8 ours), it go right for 3/4 days, after the time change, 1 ours or 3 ours instead of 8 ours. At start_up i load the time from eeprom, is possible that the ram value change in the time ?? in all routine i have not modified the value but only copied in W register.
the interrupt routine is this:
;--------------------------------
ORG 0x0000 ; start code
nop ;
goto Start ;
;----------------------------------------------------------------->Interrupt<
ORG 0x04 ;
movwf intw ;
swapf STATUS,W ;
clrf STATUS ; Bank0
movwf ints ;
movf PCLATH,W ;
movwf intp ;
clrf PCLATH ; ISR in pag0
movf FSR,W ;
movwf intf ;
;--------------------------------
btfsc PIR1,TMR1IF ; timer1
call Timer_1 ;
;--------------------------------
movf intf,W ;
movwf FSR ;
movf intp,W ;
movwf PCLATH ;
swapf ints,W ;
movwf STATUS ;
swapf intw,F ;
swapf intw,W ;
retfie ;
;--------------------------------

register allocation
ints equ 0x7c ; interrupt copy status
intp equ 0x7d ; interrupt copy pclath
intf equ 0x7e ; interrupt copy fsr
intw equ 0x7f ; interrupt copy W
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top