Getting Started with the PT6961 6-digit 12-segment LED driver with30 key switch scan

Having recently salvaged a PT6961 chip from the display of a decommissioned DVD player, I have done some experimenting and put together the attached "Getting Started" tutorial for anyone else who may find chip this interesting or find themselves in possession of a display using the PT6961 chip.

Finding the complete (18 page) version of the most current (V1.7 dated Mar 2011) datasheet took some time Googling as many datasheet archives only hold a 4/5 page version with no details on how to drive the chip.

I did find some sources of the PT6961 on Ebay and also found reference on other forums to folks who had purchased 4-digit 7-segment displays with the PT6961 as the driver chip and seeking help to get it going. Seemingly no past posts on the PICAXE forum for this chip.

Note that the MAX6955 is another chip (using i2c comms instead of SPI) which does have a few advantages over the PT6961 such as 8-digit 14/16-segment driver, and inbuilt decoding for ASCII character set. I may cover this chip another time.

In addition to the tutorial, I have attached a copy of the 18M2 Demo program code so the formatting is complete/correct.


Last edited:


Senior Member
using a tofd-5465 chip with small code for 20m2

Hello I used to use basic stamp2 chips and have been using the mc14489 display driver for alot of projects but I just started using the picaxe 20m2 chip. I am editing this post because before it didn't work but of course for me I was missing the ground connection but now its working perfectly. I think ebay still sells these (tofd-5465) displays for like 20 bucks for 10 of them. I love the way it only uses 2 pins or 3 for chip select. The displays dont have decimal points tho.
Here is my simple code so far
 symbol sclk = b.6 '‘ clock for tofd-5465
 symbol sdata = b.5 '‘ data for tofd-5465
 symbol cs = b.7 '‘ enable for tofd-5465
 symbol counter = b7 '‘ variable used during loop
 symbol mask = w1 '‘ bit masking variable
 symbol var_out = w2 '‘ data variable used during shiftout
 symbol bits = 8 '‘ number of bits
 symbol MSBvalue = 128 '‘ LSBvalue ‘(=128- 8 bits512-10 bits, 2048-12 bits)ts)  its LSB first
high cs
 low sdata
 low sclk
output sclk
output sdata
output cs 

  low cs
           var_out =  $8c  ' dims the display  $89 - $8f       
    gosub shiftout1        
   pause 10      
           var_out = $c0  ' This is the RAM address    
    gosub shiftout1        
   pause 10
           var_out = $00  ' writes 0 to ram address       
    gosub shiftout1        
   pause 10
     high cs
 low cs
        var_out = $C0      'digit 1       
      gosub shiftout1
        var_out = 6          'displays num 1         
      gosub shiftout1
    var_out = $C0          'digit 2       
      gosub shiftout1
        var_out = 91        'displays num 2         
      gosub shiftout1
    var_out = $C0          'digit 3       
      gosub shiftout1
        var_out = 79        'displays num 3         
      gosub shiftout1
    var_out = $C0          'digit 4       
      gosub shiftout1
        var_out = 102      'displays num 4         
      gosub shiftout1
high cs
goto displaytest    ' <---if you put END here it will be the same result

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 '&#8216; data high
SKIPLSB: pulsout sclk,1 '&#8216; pulse clock for 10us
var_out = var_out/2 '&#8216; shift variable right for LSB
next counter
the code when running will display 1 2 3 4
Last edited by a moderator:

Welcome to the PICAXE forum.

Also, well done on getting your PT6961 based display up and running.
(noted also here and here

I have moved your post from the bottom of the MAX7219 thread that I had started to this PT6961 thread as it is more appropriate here in terms of chip type.
Additionally I put some code tags around the program listing so it appears more formatted (with indents as seen in the PICAXE programming editor) and in a sub-window.

If I may be permitted a few comments with respect to your post and code:
1. The pin you have referred to as a chip select is more correctly a strobe pin to in effect tell the PT6961 to use the data sent thus far. If your ongoing serial transmission includes a sequence of commands and setting you must keep strobing the date whereas a pure chip select (CS) pin might be able to be held in the active state forever.
2. You have defined a word variable for the serial data transfer mask
symbol mask = w1 '&#8216; bit masking variable
this should ideally be made a byte variable to save a variable and possibly can even be a bit variable as per my code example in the first posts to this thread.
3. where you have the program lines:
high cs
 low sdata
 low sclk
output sclk
output sdata
output cs
The three output commands are unnecessary since the HIGH and LOW commands will automatically set the nominated pins as outputs.

4. As you are sending the same PT6961 memory location each time with the lines like:
var_out = $C0 'digit 2
all of the displayed digits &#8220;1&#8221;, &#8220;2&#8221;, &#8220;3&#8221;, and &#8220;4&#8221; are I believe going to appear on the same digit of the 4-digit display.
If you want each value shown on a different digit, then you can either:
(a) change the $C0 to $C2 for digit 2, to $C4 for digit 3 and $C6 for digit 4
(b) change the second, third and 4th instances of sending $C0 to $00 and that will fill the upper byte of each digits RAM buffer and advance your data to the next desired digit address since the PT6961 as auto address incrementing (if turned on).

EDIT: I have just received some SOIC32 adapter boards and will hopefully soon have some 2-digit/character 14-segment LED displays. Believe that I can achieve a reasonable good version of the alphabet (Capitals only) and digits (0-9) using just 12 of the 14 segments.
More on PT6961 codeing once I have all the displays to hand and assemble a small project up.
Last edited:
I found this code and have got it to work but it writes from left to right instead of left to right. Any idea what I
have to do to change it? I've tried and can't figure it out. It for my grandson. He's wanting to build a clock for
Hello reidsmith,
Welcome to the PICAXE forum.

Are you using a commercially built module or one you have wired yourself.
Seems like the wiring between the PT6961 and display are swapped.

Can you post a link or schematic for the circuit you are using.
Also your PICAXE program.
This will help folks to understand what is happening and a specific solution.

If the hardware is fixed then possibly pointing first to the PICAXE location for the last digit data and using ptrdec instead of ptrinc may solve the situation.