![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
I've got to put together a custom countdown timer, and I'm having a hard time settling on how to proceed. I don't want to do a lot of experimenting or trial and error with this - I'd like to complete it by the end of the week. I will be using a 16F PIC, because I already have them, and my programmer can't handle anything but 8DIP / 18DIP.
The purpose of this is to provide a countdown timer for a speaker, so they can see how much time they have left via a display. It will provide some extra visual warnings at certain points, like when they only have 5 minutes left, via high-intensity LEDs. In the future I will probably interface this timer with other units wirelessly, so they will all stay in sync and can control each other. The decision I'm having trouble with is whether to go with 4 7-segment LEDs or an LCD panel. The LEDs would require an awful lot of pins (11), verses an LCD (7). I would rather keep this simple and not have multiple PICs or extra driver ICs. The main caveat with the LCD is that I would like something like a 2 line display but displaying numbers using the entire height - so the digits are at least the size of your typical 7-segment LED. Can I use user-defined characters interfacing a HD44780 in 4-bit mode? Has anyone tried using a 2-line display with custom glyphs to make full-height numbers, and how did it look? If I did go with the LEDs I would have to try and share some of those pins as inputs (minute, second and start/stop buttons). Which route would you take? Dan |
|
|
|
|
|
|
(permalink) |
|
If you use a 16F88, you can get 16 I/O pins if you are willing to settle for 1% accuracy. This will be enough for the LED display and 7 buttons - have the buttons connected to 1 pin and to the 7 segment lines via diodes so they can only pull the segment lines low when the output is low. Actually, as that would only require 12 I/O pins you could put a watch crystal on timer 1 for a more accurate clock.
Mike. |
|
|
|
|
|
|
(permalink) |
|
Mike, you reminded me of another question I forgot to ask. Most of the PIC programming I've done is serial / IrDA type stuff, so timing wasn't really critical. So I have no idea what type of accuracy I would be looking at over 30 minutes using the internal oscillator. 1% over 30 minutes would be off by 18 seconds, which isn't acceptable.
Dan |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
If you use a watch crystal (32768Hz) on timer 1 and the internal oscillator you can get a very accurate timer. The 16F88 data sheet has example code showing how to implement a clock with this configuration.
Mike. |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| 555 timer countdown | admeech29 | Electronic Projects Design/Ideas/Reviews | 4 | 27th May 2007 01:37 AM |
| :: Timer 2 Woes :: | suby786 | Micro Controllers | 2 | 5th May 2007 11:13 AM |
| Countdown Timer buzzer | Stevie_j_b | Electronic Projects Design/Ideas/Reviews | 8 | 9th March 2007 02:12 PM |
| 89C52 Timer | ahmedragia21 | Micro Controllers | 9 | 10th February 2007 01:55 PM |
| CMOS Timer Project? | Newtronics | Electronic Projects Design/Ideas/Reviews | 10 | 11th August 2003 12:07 AM |