PDA

View Full Version : Display Using Cascaded 74hc595



charudatt
- 7th December 2004, 02:54
Hello friends,

I am planning to build a 3 digit (Seven Segment - 4 inch) temperature display using 12F675 and cascaded 74HC595.

I am familiar with the ADC part on the 12F675, but not too sure on the display part.

Can anyone help me with some code example for displaying result of my ADC using HC595 or similar.

Thank you.

mister_e
- 7th December 2004, 03:15
depending on how you'll connect these HC595. Let's say you connect them in cascade, you can use SHIFTOUT three time, one for each digit. that's the easyest way i can see.

charudatt
- 7th December 2004, 03:42
Thank you Mister_e

Do you have any code example for the Shiftout.

I attach a schematic of the display which I am planning to use.

mister_e
- 7th December 2004, 04:57
here's a pseudo code

disable latch
shiftout ser,clk,mode,[digit2,digit1,digit0]
enable latch

looks simple hey!!!

to test it simply shift three different value out and see if you get the good results at the end. after that you'll have to produce your own table to give to a specific digit value the according output pattern to your 7 segments. Can use internal EEPROM or an ARRAY to store them and refer to it.

let's say that (they're not the truth here)
digit=0 OutputTo7Seg=$05
digit=1 OutputTo7Seg=$03
digit=2 OutputTo7Seg=$0A
digit=3 OutputTo7Seg=$06

store your pattern to Internal EEPROM

DATA @0,$05,$03,$0A,$06

after that when you need to convert your digit into 7 segment representation:

read FirstDigit,digit1 'where FirstDigit is the numeric value to be converted into 7 segment representation

Shiftout ser,clk,mode,[digit1] 'send to 7 segments display.


that's a really rough code but suppose to be enough to start...

charudatt
- 7th December 2004, 06:05
Thank you,

Let me try it and get back to you on the code , I shall keep you and others interested , posted on it.

regards