-
Conclusion
05/21/2017 at 13:50 • 0 commentsI forgot to update few things, such as the schematics with the two buttons to adjust the time and the transition effect.
I changed slightly the code for a more entertaining (supposing a clock could entertain...) transitions each minutes. It's a king of erasing/re-writing effect :
And you can find bellow and in the project files the schematics with the buttons to increments minutes and hours. I would be silly to have a clock that cannot be set...
After more than a year of running, I had to recharge the 3 AA NiMH batteries only 3 times. Not bad.
-
Optimisation
02/20/2016 at 16:15 • 0 commentsI spend some time to lower the overall power consumption in order the clock could run on batteries. I'm sure there is still rooms for improvements. The CPU is on sleep, and only the second 32.768Khz oscillator is running for RTC and LCD driving. All unused peripherals are off. It wakes up every seconds to update. Right now everything consume roughly 200uA.
I used directly 3 NiMH AA batteries, no regulator. That's give voltage between 4V amd 3.3V. Let see if it last at least few month.
I made a quick frame :
And now, no relief ! Could no say "Oh god, I didn't see the time passing while I'm playing...."
-
It is time
02/16/2016 at 09:59 • 0 commentsIt is quite tedious to wire and solder 48 segments ! I don't have proper connectors, then I soldered the wires directly between the proto boards. I started to make them following a nice path... But it's ended with a - hum - a nice mess of wires :D
Anyway, it's working great ! I put the digit alternatively upside down in order to groupe the hour-minute-second numbers. I though in this way it makes the double-dot between each numbers, but it's not exactly what we are use to see. I have to think a bit more about that.
For the moment it just displays the time with the dots flipping each .5 second. I now have to think about nice digit transitions/animation. As well as study deeply the PIC datasheet in order to put as much as possible parts of the micro in sleep mode to reduce consumption.
I should not forget to make a frame in order to pass successfully the girlfriend acceptance test...
-
​First soldering and first limitation.
02/15/2016 at 17:14 • 0 commentsI finally manage to solder the TQFP 80 package of the PIC on the breakout board. Everything seems alright, I can program the chip with the Pickit.
It took me some time to figure out why the RTC was not working. I took a scope and checked the 32.768KHz second external oscillator, and could see a sine wave appearing. And that was the point. The signal appears when I put the scope probe on the quartz pin. The error was a wrong capacitor value. Somehow I put a 100nF cap instead of a 12pF for one of the quartz surrounding grounded capacitors. I don't know how the probe change the circuits impedance and makes it start oscillating, but with the correct capacitor I could now see the RTC running.
A nice thing with the PIC 18F87K90 (let's call it the PIC...) is it can drive 48 LCD segments in static. Which is exactly all the segment I have on the 6 panels. 7 segments for the character and one dot. But... and it seems there is often a but with Microchip... But on the 48 pins able to drive LCD segments, one is multiplexed with the RTC oscillator... (pin 35 mixed SOSCI and SEG32)
Well, I decided to get rid of one dot ;)
Right now I connected 2 digits and they display the seconds of the RTC. It's working great however I should wait all segments are connected. I'm sure I will have to fine tune the Pic parameters to have nice contrast. After that, perhaps there is nice digit transition to make ? In addition, I have to think of time adjustment buttons.