Thursday, April 28, 2011
There are numerous clock projects which use Atmel AVR microcontrollers, but few use the Atmega48, and of the few that do, all are programmed in C or Assembly language (or using the Arduino IDE). I am too lazy to program in assembly language ... been there, done that for 15 years. I never learned C, and don't feel like learning the Arduino stuff, so BASCOM (compiled basic from MCS Electronics) is the AVR programming language of choice, for me. For more about BASCOM AVR see www.MCSelec.com Something I did NOT want in a simple clock was any I2C real time clock peripherals from Dallas, NXP (or others), batteries and crystals. In the big clock I slapped together, real time is kept within the AVR via BASCOM firmware, and is accurate to the 60hz AC line (USA). There are ZERO quartz crystals used in this project. Displays are IEE2352E, similar to Lumex LDS-AD16RI but the IEE2352E have one less diode per segment for a lower forward voltage drop per segment. This is important because it allows the entire clock to function from same +5 volts as the Atmel microcontroller and direct drive the digit's segments from the MCU pins without level shifters (unusual for any clock with digits this tall). The 57mm 7 segment LEDs are driven directly from the AVR chip, sinking an average 25 mA per segment with very acceptable brightness. This clock may be powered from a computer's USB port as a GewGaw. When my firmware detects the absence of the 60hz AC line time base, it automatically reverts to ...
http://www.youtube.com/watch?v=Udm9arq9ATs&hl=en
Labels: BASCOM