Thursday, July 30, 2009

How to display time and date on seven segment LED display?

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.

How to display time and date on seven segment LED display?
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.
Reply:Check the link below for ideas





http://www.electro-tech-online.com/searc...


No comments:

Post a Comment