Will a PicAxe interface to a m5450 7 seg LED driver


New Member
Hi All,

Great Forum...

I have obtained an old LED scoreboard that is based on an 5450/5451 7 SEG driver, which I want to control via a picaxe 8, or 18x.
I have created a couple of the more simpler projects using the PicAxe 8, so are familiar with PicAxe, but by no means an expert. The issue I am having is that the 5451 requires synchronous serial data, based on a seperate clock cycle. I notice the picaxe has a serial output, but this appears to be an asynchronous using stop and start bits.

I need to send a clock out from one pin, while at the same time send 36 serial bits in sync with the clock. Alternative supply an external clock, and sync the output stream to this clock. This prcoedure is required for each of the 7 segment changes.

In order to do this, I need to know if there are any commands that can synchronise the two. Any assistance would be great...




Senior Member
No big deal. The interface is simply a clocked data load: the data is read from the DATA pin whenever there is a low-to-high transition on the clock pin.

Have a look at the ShiftOut command in the Command Manual.


New Member
A big thanks, you have pointed me in the right direction...

The original editor and helpfile I was using was 3.5.1 and this didnt have the command in it. I have now download the latest editor and read up on the shiftout command.

In the manual it specifies that this command doesnt work with all PicAxe, and when I tested uisng the emulator(picaxe8m, & picaxe18x)I kept receiving syntax errors, using:

let b1=100
spiout 1,2,LSB_First, (b1 / 8)

I then used the alternative method specified under the same heading:

for counter = 1 to bits ‘ number of bits
mask = var_out & 1 ‘ mask LSB
low sdata ‘ data low
if mask = 0 then skipLSB
high sdata ‘ data high
skipLSB: pulsout sclk,1 ‘ pulse clock for 10us
var_out = var_out / 2 ‘ shift variable right for LSB
next counter

This runs great, and will solve my problem. However I would still like to get the original single line of shiftout or spiout working, to save some memory for counting, etc....... Perhaps someone has used it and has a command line example..

I have a solution though, so the forum is great and has helped heaps...


Technical Support
Staff member
<i>I would still like to get the original single line of shiftout or spiout working, to save some memory for counting, etc </i>

You would have to buy a PICAXE which supports those commands to use them; 28X1, 40X1 and the 28X2 or 40X2 due in the future. The other PICAXE's do not, and probably never will, support the single line commands.

There is some scope for optimising the bit-banging code, and an 18X has quite a lot of program memory to start with -<code><pre><font size=2 face='Courier'>#picaxe18x

Symbol SDATA = outpin0 ' DATA from pin0
Symbol CLOCK = 1 ' Clock from pin1

For counter = 0 to bits_minus_one
SDATA = var_out
PulsOut CLOCK,1
var_out = var_out / 2
Return </font></pre></code> That's 33% shorter than the original example code.

Edited by - hippy on 04/09/2007 13:46:26