shahidali55,
Do you have an updated program?
I tried to compile the program from post#1, but it has too many errors.
It also has the pushbuttons on the same pins as the segments, and ASM opcodes in column 1.
<br>
shahidali55,
Do you have an updated program?
I tried to compile the program from post#1, but it has too many errors.
It also has the pushbuttons on the same pins as the segments, and ASM opcodes in column 1.
<br>
DT
Hello Darrel,
As you suggested in post 2, the battery now charges from output from the 5v regulator (through a diode and a 2.2k resistor). The voltage at the PIC never rises above 4.6v. I tested this system with a 20v DC supply and the voltage at the pic pins is still at 4.63 volts (after 48 hours of running).
I have attached a copy of the file with the required include (Instant interrupts) as a zip archive.
The pushbuttons are not a concern now since the primary function of the device itself
(i.e. keeping time) is not met.
Is ASM opcodes in column 1 bad ?
I don't understand why you've modified DT_INTS-14 like that. There's no need.
I also don't like modified versions being posted on the Internet. Somebody will download it, it won't work, and then they'll blame me.
Yes! Very BAD!Is ASM opcodes in column 1 bad ?
ONLY Labels can go in the first column of ASM code.
This applies to lines using the @ sign too. There must be a space after the @. (unless it's a label)
With opcodes in column 1, the program won't compile. So that can't be the program you are currently running in the chip.
DT
Strange . . .
Compiles fine for me.
I have corrected the OPCODE in column 1 errors and attached another copy of the file.
Sorry for modifying DT_INTS-14 , it it your work and i respect that. I modified it in my frustating attempts to correct the resetting and locking up of the chip.
(still getting 3 warnings though)
That is Strange! Wouldn't compile here the way it was before.
I can't see anything in the program that would cause it to lock up.
So I put together a breadboard to see what I could see.
click image for larger version
It's running on a 16F88 right now. Couldn't find my 628A.
I'll see if it makes it past 7:14 first.
Then set the time, and let it run.
Hopefully I can find that 628A by then.
I'll let you know if it locks up.
DT
Thanks DT.
That is one really neat breadboard.
Did you notice the hourly on screen animation?
Just after the two LOOKUP statements there is a tricky piece of code that used to blink the colon:-
;if bres_hi<8 then
; Segments.7=0
;else
;Segments.7=1
;endif
It is there in the code posted in #1.
The code in post #18 has this part commented. Hence no blinking colon.
But after 4 days of testing with this code (#18) everything seems to be fine.
Could the blinking colon code have caused the problem?
To blink the colon, i used to check a critical time keeping variable (bres_hi) of the 24 bit counter. I think if bres_hi was being read when an interrupt occured and the ISR tried to update the register, it got corrupted. Can this happen?
Last edited by shahidali55; - 19th June 2008 at 18:46.
It is pretty neat isn't it? I'm actually thinking about hanging it on the wall just like it is.
It's still happily keeping time. No glitches so far.
I can't image that the blinking colon would have made any difference, but I'll uncomment it just for diligence sake.
Yup, I saw the animation. That's cute. Also saw the upside down digits that I can see in your previous pictures, were mounted that way. Accidental??
I commented out the extra Lookup and IF statement.
Still haven't found the 628A, but I don't think there's enough difference to matter.
I suppose I should put a battery in there and run it at lower voltages too.
<br>
DT
Bookmarks