Using PICAXE to drive Large 7-segment LED with TPIC6C596 driver board

hal9000

Member
hi all,

Having a bit of trouble with trying to display numbers on a jumbo 7-segment LED panel. I'm using a fairly universal 'large digit driver' pcb with these things. When I use an oscilloscope on the PICaxe output pins, it seems the SER pin (serial data) sits low and the picaxe is trying to send it high, but it only reaches about 08v at its max when being driven. The other signals are pulsing/transitioning to logic high and low with no problems.

Is anyone familiar with using these LED drivers? Is my code alright?

Code:
' JUMBO LED:
' - these are SS5001SR2 - 180177
' - driver interface ic boards are TPIC6C596
' - LED driver board is :
'  BLU = GND
'  GRN = LAT = RCK
'  YEL = CLK = SRCK
'  ORG = SER
'  RED = +5v
'  BRN = +12v

symbol SER = C.6   ' Serial Data                 ' SER ORG
symbol SRCK = C.5  ' Shift Register Clock         ' CLK YEL
symbol RCK = C.4   ' Register Clock Input (Latch)     ' LAT GRN


' Initialization
init:
  low SER
  low SRCK
  low RCK
  pause 100
  
  high RCK  ' Set RCK high initially
  pause 10  ' Pause to stabilize


main:
  for b0 = 0 to 9
    gosub send_digit
    pause 500  ' Display each digit for half a second
  next b0
goto main


send_digit:
  low RCK  ' Prepare to latch new data

  select case b0
    case 0
      b1 = %00111111  ' Display 0
    case 1
      b1 = %00000110  ' Display 1
    case 2
      b1 = %01011011  ' Display 2
    case 3
      b1 = %01001111  ' Display 3
    case 4
      b1 = %01100110  ' Display 4
    case 5
      b1 = %01101101  ' Display 5
    case 6
      b1 = %01111101  ' Display 6
    case 7
      b1 = %00000111  ' Display 7
    case 8
      b1 = %01111111  ' Display 8
    case 9
      b1 = %01101111  ' Display 9
  endselect

  for b2 = 0 to 7  ' Loop through 8 bits of the digit
    ' Send each bit to the shift register
    if b1 BIT b2 SET then
      high SER
    else
      low SER
    endif
    pulsout SRCK, 5  ' Pulse the shift register clock
  next b2

  high RCK  ' Latch the new data
  return
 

Attachments

tmfkam

Senior Member
Your code looks good to me. Are you trying to send your serial data into the serial "out" pin and not the "in" by mistake? I have used many low power 74HC595 equivalent devices in many different designs and find them to be fabulous. If I need higher power or higher voltage I tend to use either buffer transistors or a ULN2003 and then either invert the data electronically or in code to compensate for the inversion at the output.
 

AllyCat

Senior Member
Hi,

You haven't specified which PICaxe you're using, but it's presumably a 28 or 40X2 , because you're using an X2-only command (IF ... BIT ... SET ....) and pin C.6 on a 20X2 is "Input Only" so can't be used to drive the SER pin ? Also, what are the 5 and 12 volt rail arrangements and do any segments ever light up?

It's probably the connections you've made to the Display Driver Board that are significant (where are the coloured wires mentioned in the Listing?). A voltage being limited to 0.8v (?) could be that it's on a forward conducting diode, for example an "Electrostatic Protection Diode" (if the pin is being driven Higher than the Supply rail/pin or Lower than the Ground rail/pin of the IC) or a faulty component or connection.

Cheers, Alan.
 
Last edited:

hal9000

Member
hi,

Well I'll be a monkeys uncle. Its been about 83'f (28'c) in my workshop the past few days and clearly my brain is cooked!

tmfkam = I totally had it plugged into the output this whole time. ARGH! hahah plugged it into the input side and suddenly I get life! its not correct yet (digits are not lighting the correct segments, so maybe my bit patterns are off) but it more or less works! at least it does somethgin.

AllyCat - its a 28X2 must've chopped that compiler director from the top of the code.

Now to check the wiring, and check my bit-codes for the number representations of segments.

thanks so much, i clearly needed to pack it up, walk away and throw it out to the universe to correct me.
 
Top