Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.

xTimer with 4094

xTimer with 4094

This new design uses a cheap CMOS shift register, 4094 for LED interface. Each 4094 drives a 0.5″ 7-segment without the need of limiting resistor. The left-hand LED is timer function with buzzer alarm output. The right-hand is for clock display.
Software The firmware is timer interrupt driven program. The interrupt rate is 100Hz. The XTAL is 24MHz. Timer0 receives 24MHz/12=2MHz. To produce 100Hz, the reload value then equal 65536-20000=45536 or 0xB1E0. Below is timer0 interrupt service function. All tasks will be executed every 10ms The autho has replaced timer function for timer3 and timer4 with clock. Below shows new layout. Now Key3 and Key4 can adjust current time for HOUR and MIN easily. The SPI signals: DIN, CLK and STROBE are declared to use P1.6, P1.7 and P1.5. The function that interfaces to the eight 4094 is write_LED( ). The function has a nest loop using variable i and j. i is for inner loop counting, j is outer loop counting. The inner loop shifts 8-bit from buffer variable. Begin with buffer[0] to buffer[7]. Each byte will shift bit 7 first. This is done by ORing with 0x80. If true, then set DIN with “1” else with “0”. The bit is shifted with 0-1 transition of CLK signal. The inner loop will do 8 times by outer loop counter using variable j. When 64-bit are shifted, the STROBE signal will make 1-to-0 transition to strobe all bits to the output.

Visit Here for more.

 

More Articles to Read

Single-Sided USB Charger
Single-Sided USB Charger
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Replace a microwave’s beeping with the Windows XP startup sound
Replace a microwave’s beeping with the Windows XP startup sound
A DIY Laser Scanning Microscope
A DIY Laser Scanning Microscope
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
ESP8266 LED lighting: QuinLED v2.6 PCB
ESP8266 LED lighting: QuinLED v2.6 PCB
Switching LVDS Graphics in a Laptop Computer
Switching LVDS Graphics in a Laptop Computer
Teleknitting: TV-based string art
Teleknitting: TV-based string art
DIY Bubble Machine
DIY Bubble Machine
Start your day with Nerf target practice!
Start your day with Nerf target practice!
Teardown of a Peaktech 6225A
Teardown of a Peaktech 6225A

Top




Shares