8 digit LED display - Page 1
Forum section: electronics / projects

author: williefleete
author_rank: Regular Contributor
timestamp: November 28, 2010, 10:58:21 am
content: 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 maximumafter 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 paydirtusing 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 electricallythe image is my very first unit using mostly fresh components however one display blew so a junk one is substitutedafter 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 brilliantat 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 displayhowever 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 atwww.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 charactersthe "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 symbolsthe 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 usedgranted 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

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 28, 2010, 11:26:20 am
content: nice

author: GeoffS
author_rank: Unknown
timestamp: November 28, 2010, 11:42:42 am
content: 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 tothis unitat 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.

author: EEVblog
author_rank: Unknown
timestamp: November 28, 2010, 12:11:48 pm
content: Quote from: williefleete on November 28, 2010, 10:58:21 amThat looks spookily similar to my own LED clock project. I might show this on the live blog tomorrow.Dave.

author: Zero999
author_rank: Super Contributor
timestamp: November 28, 2010, 12:38:25 pm
content: 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.

author: JohnS_AZ
author_rank: Frequent Contributor
timestamp: November 28, 2010, 08:33:53 pm
content: @GeoffS Have you looked at the Maxim MAX7219?http://www.maxim-ic.com/datasheet/index.mvp/id/1339It's $12 a chip, but it looks good.

author: williefleete
author_rank: Regular Contributor
timestamp: November 28, 2010, 10:08:58 pm
content: i have got a schematic and i can post the picaxe codehttp://www.resistorhelper.org/imgs/leddisp/8digitsch.gifthe 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 charactersCode:setfreq m8'out 0 clock'out 1 data'out 2 strobe'out 4 output enablehigh 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 loopsymbol mask = b2 ' bit masking variablesymbol var_out = b1 ' data variable used during shiftoutsymbol bits = 8 ' number of bits'addressing register codesif input3 = 1 then 'if the serial line is high on rebootb0 = 1 'enter the debug modeend 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 codespoke 90, 128poke 91, 64poke 92, 32poke 93, 16poke 94, 8poke 95, 4poke 96, 2poke 97, 1'display number dataeeprom 0,(231,132,211,214,180,118,119,196,247,244,16)'numbers 0 thru 9 and coloneeprom 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 displayrandomloop:serin 3, n2400, b4,b5,b6,b7,b8,b9,b12,b13 'receive 8 characters'buffer thempoke 80,b4poke 81,b5poke 82,b6poke 83,b7poke 84,b8poke 85,b9poke 86,b12poke 87,b13'process themfor b10 = 80 to 87peek b10 ,b11if b0 = 0 then 'if its not in debug mode continue otherwise skipif b11 = 7 then 'if b11 is 7 (bel) charactersound 2,(100,50) 'beepb11 = 0 'show a blank display when updatedend ifif b11 >= 48 and b11 <= 58 then 'if the current variable is between' 48 and 58b13 = b11 - 48 'take off 48read b13, b11 'read from eepromend ifif b11 >= 65 and b11 <= 85 then 'if the current variable is between' 65 and 85b13 = b11 - 50 'take off 50read b13, b11' read from eepromend if'if none of them are recognised it defaults to raw binary'decimal point selection codeif 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 aboveb11 = 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 ONend ifend ifend ifpoke b10, b11 'poke the ram with updated (if any) changesnextgosub shiftout_lsbfirst 'update the displaysgoto randomloopshiftout_LSBFirst:for b11 = 90 to 97peek b11, var_out'update the address register firstfor counter = 1 to bitsmask = var_out & 1low sdata ‘ 'data lowif mask = 0 then skipLSB2high sdata' , 10 ‘; data highskipLSB2: pulsout sclk,1var_out = var_out / 2next counterpulsout 2 , 1 'update'display registerb10 = b11 - 10peek b10, var_out'broadcast the data to the display registersfor counter = 1 to bitsmask = var_out & 1low sdata 'data lowif mask = 0 then skipLSBhigh sdata 'data highskipLSB: pulsout sclk,1var_out = var_out / 2next counterpulsout 4 , 1 'update the addressed register by pulsing output enable on the address register lownextreturn

author: GeoffS
author_rank: Unknown
timestamp: November 28, 2010, 10:32:15 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: November 28, 2010, 11:05:07 pm
content: Why not use a cheap PIC with a high pin count such as the PIC16F57?http://ww1.microchip.com/downloads/en/DeviceDoc/41213D.pdf

author: williefleete
author_rank: Regular Contributor
timestamp: November 29, 2010, 12:08:53 am
content: 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 stufffirst things first is im guessing i need to make a pic programmer

author: williefleete
author_rank: Regular Contributor
timestamp: December 06, 2010, 09:39:00 am
content: Quote from: EEVblog on November 28, 2010, 12:11:48 pmi saw that on the uploaded video, my goodness what a rats nestthe 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 forumthe 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 pointin 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

author: williefleete
author_rank: Regular Contributor
timestamp: December 06, 2010, 09:59:07 am
content: 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 metera huge green display powered up in "debug" mode displaying the time in ASCII binarysome 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)