English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am using DS1307 RTC interfaced with AT89s8252,I have written a code in C using keil and i am able read the time and date and display it on PC using hyper terminal, now I want to display it on seven segment, I am using SPI interface and my drivers are 74HC595 shift registers for seven segment, can any one help with the code in C to display the time and date on seven segment using SPI.

2007-05-06 15:53:34 · 2 answers · asked by Sohail S 1 in Computers & Internet Programming & Design

I am using DS1307 RTC interfaced with AT89s8252,I have written a code in C using keil and i am able read the time and date and display it on PC using hyper terminal, now I want to display it on seven segment, I am using SPI interface and my drivers are 74HC595 shift registers for seven segment, can any one help with the code in C to display the time and date on seven segment using SPI.

2007-05-06 15:55:56 · update #1

2 answers

I'm not sure you can directly interface an SPI bus with the 74HC595. You would need some special logic between the two. There is an IC that converts BCD to seven segment display (74LS47). I would use that, then you just write out the BCD equivalent of the number (which for 0 - 9 is the same as the binary number). Hope this helps some.

If you have any more questions regarding this, you can email me.

EDIT: you MAY be able to connect your data out from the SPI to the serial data in pin on the 595. connect the SPI clock out to the shift and storage register clock in on the 595. you would have to leave output enable low, unless you have it connected to a gpio pin on the micro. and leave master reset high on the 595, again, if it isnt connected to a gpio pin on the micro. thats about the only way I can see it working using the SPI interface.

2007-05-07 01:33:26 · answer #1 · answered by justme 7 · 0 0

Check the link below for ideas

http://www.electro-tech-online.com/search.php?searchid=208796

2007-05-06 16:14:53 · answer #2 · answered by cinu 4 · 0 1

fedest.com, questions and answers