Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

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

Freetronics Christmas Gift Guide
Freetronics Christmas Gift Guide
The Sandwich-o-Matic will make your lunch automatically
The Sandwich-o-Matic will make your lunch automatically
Scalar Network Analyser Jr
Scalar Network Analyser Jr
An Arduino-controlled automated whiskey distillery
An Arduino-controlled automated whiskey distillery
The Rex800 looks like a dinosaur Terminator
The Rex800 looks like a dinosaur Terminator
Home Environment Monitor
Home Environment Monitor
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
Noisy ESP8266
Noisy ESP8266
Noisy ESP8266
Noisy ESP8266
App note: Noise analysis for high-speed op amps
App note: Noise analysis for high-speed op amps
Skill Sunday: Arrays
Skill Sunday: Arrays
App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders

Top


Shares