Author Topic: 8 digit LED display  (Read 7943 times)

0 Members and 1 Guest are viewing this topic.

Offline williefleeteTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: nz
8 digit LED display
« on: November 28, 2010, 10:58:21 am »
ok a while ago i was playing with some nice grunty shift registers on an 08M they were a UCN5841 part which is roughly equivalent to a '595 with 8 darlington drivers and back emf diodes, these will drive common anode seven segments quite well and i made a single digit counter, dice etc in quite a little bit of space for an 08M picaxe chip using 3-4 I/O's to drive 8 maximum

after having a play with serial i got it displaying numbers from a serial stream flashing 1 digit at a time and not much else.

then an idea struck paydirt

using a bunch of ucn5841's (nine at one stage) i was able to use a master register to address another 8 registers and hence displays via the strobe lines using common data and clock lines the first one was a little unstable to start with, using all ucn5841's for display drivers and address eg i had duplicates miss strobing etc the first prototype was an arse both visibly and electrically


the image is my very first unit using mostly fresh components however one display blew so a junk one is substituted

after that one i decided to make it a bit neater, i got a nice instrument case more fresh components however i wanted to try a different addressing IC, this time using a 74HC595 which is a bit more... logic level... unlike the ucn5841's which are designed to drive power, once i got that working it was brilliant


at this point the displays are ok for numbers that was just a limitation of my (then) inefficient code, letters could be displayed by sending ASCII codes that represented the layout of the display 

however my current code can have a good 20 letters, the 10 numbers and colon plus a beep character (ASCII standard)
i have a web folder dir listing full of pics at www.resistorhelper.org/imgs/leddisp/
the input is 8 bytes of 8 bit serial at 4800 baud which can be sent at least 3 times per second with no problems eg the update rate is about 3 and a bit Hz and will work off PC rs232 or any microcontroller that sends at least 8 bytes at 4800 baud with these characters

the "bell" character (up to 8 and the display clears, this does make the update delay by about 50mS per bell character)
the standard numbers 0 through 9 (ASCII 48 - 57) colons (58), and capital ASCII letters A through U with three characters with alternate symbols

the first character on the display can be used to select a decimal point on the other displays if its ASCII "Q" it sets the next door one on R the one after that and so on, up to the last two displays which shouldnt really be used

granted there are cheaper displays (these are several hundred dollars worth a pop for all the parts even with a discount from brightsparks) but this project is one of my more advanced things i have done, its brighter (especially the big blue one i made) and bigger digits than a little 16x2 LCD display plus its extremely versatile and robust you can drive huge displays, relays or lamps even, with the UCN5841 driver chips i got on it
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: 8 digit LED display
« Reply #1 on: November 28, 2010, 11:26:20 am »
nice
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline GeoffS

  • Supporter
  • ****
  • Posts: 1272
  • Country: au
Re: 8 digit LED display
« Reply #2 on: November 28, 2010, 11:42:42 am »
Any more details on your design?
I've been looking for a 6 digit display that I can build into a digital readout for a mill (DRO) similar to the one shown below.
I've looked at doing something similar to this unit at Sparkfun but with more/bigger digits.

I'd need a minimum of 3 of these for typical milling operations with a CPU board to drive them.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38720
  • Country: au
    • EEVblog
Re: 8 digit LED display
« Reply #3 on: November 28, 2010, 12:11:48 pm »


at this point the displays are ok for numbers that was just a limitation of my (then) inefficient code, letters could be displayed by sending ASCII codes that represented the layout of the display 



That looks spookily similar to my own LED clock project. I might show this on the live blog tomorrow.

Dave.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19998
  • Country: gb
  • 0999
Re: 8 digit LED display
« Reply #4 on: November 28, 2010, 12:38:25 pm »
If you use half common cathoe and half common anode displays you can drive eight seven segment displays using  11 pins and no additional ICs.
 

Offline JohnS_AZ

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: us
    • About.me
Re: 8 digit LED display
« Reply #5 on: November 28, 2010, 08:33:53 pm »
@GeoffS   Have you looked at the Maxim MAX7219?
http://www.maxim-ic.com/datasheet/index.mvp/id/1339

It's $12 a chip, but it looks good.
I'm either at my bench, here, or on PokerStars.
 

Offline williefleeteTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: nz
Re: 8 digit LED display
« Reply #6 on: November 28, 2010, 10:08:58 pm »
i have got a schematic and i can post the picaxe code
http://www.resistorhelper.org/imgs/leddisp/8digitsch.gif

the clock is another picaxe which has a 1 pulse per second source triggering an interrupt and increments some variables and sends out 4800 baud with the variables for each time unit and colon characters

Code: [Select]
setfreq m8
'out 0 clock
'out 1 data
'out 2 strobe
'out 4 output enable
high 4 'set output enable high (outputs disabled)
symbol sclk = 0 ' clock (output pin)
symbol sdata = 1 ' data (output pin for shiftout)
symbol counter = b3 ' variable used during loop
symbol mask = b2 ' bit masking variable
symbol var_out = b1 ' data variable used during shiftout
symbol bits = 8 ' number of bits

'addressing register codes
if input3 = 1 then 'if the serial line is high on reboot
b0 = 1 'enter the debug mode
end if
'in debug mode the digit masks will not be in effect and hence display as binary, useful for debugging


'code for use with the new display units with 74HC595 registers for addressing
'addressing codes
poke 90, 128
poke 91, 64
poke 92, 32
poke 93, 16
poke 94, 8
poke 95, 4
poke 96, 2
poke 97, 1

'display number data
eeprom 0,(231,132,211,214,180,118,119,196,247,244,16)'numbers 0 thru 9 and colon
eeprom 15,(245,55,99,151,115,113,103,181,132,135,240,35,18,229,23,241,182,225,118,51,167)
'^letters A through U

'6 use 119 for "fancy" 6 or 55 for plain
'7 use 228 for "fancy" 7 or 196 for plain
'9 use 246 for "fancy" 9 or 244 for plain 9
'colon (:) displays as "-" on display

randomloop:

 

serin 3, n2400, b4,b5,b6,b7,b8,b9,b12,b13 'receive 8 characters
'buffer them
poke 80,b4
poke 81,b5
poke 82,b6
poke 83,b7
poke 84,b8
poke 85,b9
poke 86,b12
poke 87,b13

'process them
for b10 = 80 to 87
peek b10 ,b11



if b0 = 0 then 'if its not in debug mode continue otherwise skip

if b11 = 7 then 'if b11 is 7 (bel) character
sound 2,(100,50) 'beep
b11 = 0 'show a blank display when updated
end if

if b11 >= 48 and b11 <= 58 then 'if the current variable is between
  ' 48 and 58
b13 = b11 - 48 'take off 48
read b13, b11 'read from eeprom
end if


if b11 >= 65 and b11 <= 85 then 'if the current variable is between
  ' 65 and 85
b13 = b11 - 50 'take off 50
read b13, b11' read from eeprom
end if
'if none of them are recognised it defaults to raw binary

'decimal point selection code
if b4 > 80 then 'if the first digit more than 80 (ASCII QRSTUV or W)
if b10 = b4 then 'if the current loop is equal to above

b11 = b11 + 8 ;turn on the decimal point on the first digit ASCII value above 80
'eg 81 turns on second 82 third etc up to 87 for the end display decimal point ON

end if
end if
end if
poke b10, b11 'poke the ram with updated (if any) changes
next

gosub shiftout_lsbfirst 'update the displays
goto randomloop


shiftout_LSBFirst:
for b11 = 90 to 97

peek b11, var_out

'update the address register first
for counter = 1 to bits
mask = var_out & 1
low sdata ‘ 'data low
if mask = 0 then skipLSB2
high sdata' , 10 ‘; data high
skipLSB2: pulsout sclk,1
var_out = var_out / 2
next counter
pulsout 2 , 1 'update

'display register
b10 = b11 - 10
peek b10, var_out
'broadcast the data to the display registers
for counter = 1 to bits
mask = var_out & 1
low sdata  'data low
if mask = 0 then skipLSB
high sdata 'data high
skipLSB: pulsout sclk,1
var_out = var_out / 2
next counter

pulsout 4 , 1 'update the addressed register by pulsing output enable on the address register low
next
return


 

Offline GeoffS

  • Supporter
  • ****
  • Posts: 1272
  • Country: au
Re: 8 digit LED display
« Reply #7 on: November 28, 2010, 10:32:15 pm »
I'm looking at doing it with a TLC59213/TLC5916 pair as this is what is used in my current DRO.
Add a PIC or AVR so I can drive it via SPI.
Speed is not a major issue as data from the encoders is at 90Khz or so.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19998
  • Country: gb
  • 0999
Re: 8 digit LED display
« Reply #8 on: November 28, 2010, 11:05:07 pm »
Why not use a cheap PIC with a high pin count such as the PIC16F57?
http://ww1.microchip.com/downloads/en/DeviceDoc/41213D.pdf
 

Offline williefleeteTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: nz
Re: 8 digit LED display
« Reply #9 on: November 29, 2010, 12:08:53 am »
i might actually get into PIC at some stage, plus some larger chips than the little 8 pin jobbies, still, considering it is an 8 pin device it can do some pretty awesome stuff
first things first is im guessing i need to make a pic programmer  ;D
 

Offline williefleeteTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: nz
Re: 8 digit LED display
« Reply #10 on: December 06, 2010, 09:39:00 am »


at this point the displays are ok for numbers that was just a limitation of my (then) inefficient code, letters could be displayed by sending ASCII codes that represented the layout of the display 



That looks spookily similar to my own LED clock project. I might show this on the live blog tomorrow.

Dave.

i saw that on the uploaded video, my goodness what a rats nest  ;D
the display can do alot more than display a time too, i can use it to display short messages and anything that can send at least 8 byte 4800 baud bursts at about 3 times per second, you can display 8 characters of the 10 numbers 0 to 9, colons, letters A through U and a bell character which makes the display beep and clears the digit(s) where the bell character is positioned, the letters K,M and Q replaced with other symbols, i have a few videos about the display on my youtube account which has the same name as on the forum

the decimal point is selected from the first digit by a letter and each display is assigned a ram location 81 through 87 display "80" being the digit which selects the decimal point. setting that digit to 81 (ASCII "Q") turns on the digit at that ram location's decimal point and so on up to 87 which turns on the end display's decimal point

in short the display is actually quite versatile and isnt too bad considering its done in 256bytes of picaxe program space and using 4 output pins and an input for the serial
 

Offline williefleeteTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: nz
Re: 8 digit LED display
« Reply #11 on: December 06, 2010, 09:59:07 am »
heres a few more images of my unit and some other projects i made for it including a hall effect sensor based Gauss and magnet polarity meter
a huge green display powered up in "debug" mode displaying the time in ASCII binary
some other picaxe projects interfacing with the smaller unit, my huge blue unit, a thermometer i made to plug into it using a dallas 18b20 and a picaxe and a fan heater i hacked with a picaxe and a dallas 18b20 (the display with the oFF0 on it)










 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf