seven segment display driving

deneve

New Member
I would be very grateful for some help.

I want to build a circuit that will read heartbeats per minute and feed the average rate per minute to a a set of three seven segment displays. Now although I have a background in electrical engineering I am very new to picaxe work. So for the moment I am just concerned about the simple task of getting the 7 segment display bit together. I read in the picaxe manual(3) p21 that the 4026 twisted ring Johnson (decade) counter will decode to the 7seg display. I think this means that if you clock it 6 times it will give you a "6". on p22 it shows that you can daisy chain them and I presume that this can extend to three seven seg displays. However it might take a bit of time to count up to the required final 3 digits- Hopefully it will be fast enough not to notice. Aternativey I read in the D Lincoln book that the 74hc595 can also do the job by moving bits to the picaxe output port, clocking the 595 for each bit and then finally latching it to make it ready to port to the 7 seg display.

Have I understood this right and if so can anyone suggest which would be the best approach for my application. I do want to work with the 595 because of its i/o expansion capability but before I start breadboarding I would like to know which approach might be best and for what reasons.

Many thanks for any help.
 

westaust55

Moderator
Have you tried an actual search on the forum for past similar projects?



have a look at this - exactly what you want
(and titled -"3 digit display using 74HC595"):
http://www.picaxeforum.co.uk/showthread.php?t=13687

If you specifically want to use the 74HC595 to drive the display, its all there and done for you.

There are also chips out there which could achive what you want as specific multidigit/character LED type drivers. The MM5450/5451 is one such example.
http://www.datasheetcatalog.com/datasheets_pdf/M/M/5/4/MM5450.shtml

Out of curiousity, which PICAXE chip are you using?
 
Last edited:

deneve

New Member
So far I have worked with the 18X to do do serial communications back and and forth from a PC. I used DrAculas example instructibles. It was great. I was hoping to use this chip.

Thank you for your reference too. In your schematic I cannot figure out which pins of the 08m the clr, oe, latch, sclk, sda go to. Can you please advise. I think they should all be o/p pins except that I thought OE should be grounded? You have ittied down with a 10k - Can you clarify why?.

Really grateful for your input.
 
Last edited:

westaust55

Moderator
The 18X is certainly up to driving the arrangement/chips mentioned above.

There are even possibilities to consider i2c comms based chips such as the MCP23017 i2c expander which will give you 16 IO as two 8-bit ports in a single chip. I have done projects with this chips (as have others) driving 192 LED's in mutliplexed arrangements.
 

SAborn

Senior Member
The 4026 chip will work just as well if you find it easier to understand, and you can blank the display between readings if you just wish to flash the data up once sent to the chips.

There is many types of 7 seg. drivers and its more of what you can find easy at the right price i think.

Depending on how many pins you need for other things, but a lcd can be driven direct from a 18X and at around $7.00 for a 2 line 40 char. display would work out cheaper than the 7 Seg. display.

Have a look on Ebay at a store called .....Sureelectronics.... ( China) as they have some low priced led displays with drivers already on board and good products. (saves a lot of work)
 

westaust55

Moderator
In your schematic I cannot figure out which pins of the 08m the clr, oe, latch, sclk, sda go to. Can you please advise. I think they should all be o/p pins except that I thought OE should be grounded? You have ittied down with a 10k - Can you clarify why?.

Really grateful for your input.
For the 74HC595, the Output Enable (OE) input pin is active low.
The 08M has only a max of 4 outputs so by using a pull-down resistor the 74HC595 circuit will work even if there is no OE signal from the PICAXE to the display board.

If you want to blank the LED display, then you can set the OE signal high and it will turn off the '595 outputs thus no display.
By using the pull down resistor, if the signal is controlled by a PICAXE and taken high we do not end up with a short circuit between the PIACXE output on high and the 74HC595 pin tied directly to 0V.


The '595's clr signal is also active low. I use a pull up resistor to hold this ligh high which prevents the 74HC595 front end shift registers continuously being cleared.
When driven low (by the PICAXE), this signal sets the front end shift registers of the '595's to zero (%00000000) but does not itself set the output pins to a low state.
Thus you could clear all the front end shift registers and then just shift in 1 byte to the first '595 and then use the Latch signal to transfer the data from the front end shift registers to the output latches of all '595's.

As a minimum circuit, you could just use the latch, sclk, sda signals.
use of the oe and clr signals is optional depending upon how many PICAXE outputs you have and what you wish to achieve.
The use of the pull down and pull up resistors make the board more universal without any further changes.

If you look at the program code specific for the 08M you will see at the top that I am only using the three 08M pins (1, 2 and 4):
Code:
SYMBOL sdata    = 1	; serial data on pin 1
SYMBOL sclk       = 4	;  serial clock on pin 4
SYMBOL latch     = 2    ; latch data to 595 outputs
The other 2 74HC595 signals (clr and oe) and held in working default states by the mentioned resistors
 
Last edited:

deneve

New Member
Hi WestAust55

Thank you so much for your detailed answer which has cleared up a graet deal for me. Thank you also SAborn for your insights which I will look into.
 

deneve

New Member
The 4026 chip will work just as well if you find it easier to understand, and you can blank the display between readings if you just wish to flash the data up once sent to the chips.

There is many types of 7 seg. drivers and its more of what you can find easy at the right price i think.

Depending on how many pins you need for other things, but a lcd can be driven direct from a 18X and at around $7.00 for a 2 line 40 char. display would work out cheaper than the 7 Seg. display.

Have a look on Ebay at a store called .....Sureelectronics.... ( China) as they have some low priced led displays with drivers already on board and good products. (saves a lot of work)
Hi SAborn

Just been re looking at your comments. Do you have an example circuit of how to drive the lcd by an 18x. I am not sure how to do this with only 8 outputs unless you expand them using shift register and latch?
 

westaust55

Moderator
Hi SAborn

Just been re looking at your comments. Do you have an example circuit of how to drive the lcd by an 18x. I am not sure how to do this with only 8 outputs unless you expand them using shift register and latch?
In post 1 you mentioned "three seven segment displays" which I took to be three separate 7-segment LED type displays.
Now there is discussion of an LCD display.

For an LCD display, as already mentioned, if the PICAXE has 6 outputs available you can control readily and fast enough in 4-bit data mode with a couple of control lines.
forum member hippy has a separate website with details on what to do:
http://www.hippy.freeserve.co.uk/picaxeqa.htm
There are many posts on this forum with respect to this circuit and code.

I have built and posted details on this forum for a 2 (or 3) wire shift register based 8-bit LCD module interface (some possible caveats on LCD signal timing). See this thread: http://www.picaxeforum.co.uk/showthread.php?t=13900
Not as fast as the 4-bit direct driven method but useful if you want to drive an LCD with a limited spare PICAXE outputs without purchasing an AXE033 or other commercial 1-wire serial LCD display.
 

deneve

New Member
Once again westaus55 thank you for your helpful and detailed comments. Yes the discussion has switched about as all the ways of displaying have come up. I do like to learn about the various ways of doing things before diving in. That way I can learn as much as possible from one project.

I think I might play around with both options (7 seg with 595 as well as LCD) to get some experience of both

Thanks again for all your help.
 
Top