As this product is open source with both software and design, everyone is welcome to help writing a driver.
The 17Ledtest.spin is close to what a driver will be, but it does not pharse ascII from spin yet.
Just include the above font from post #22 and it's close.
And of course a real driver it does not need the large delay that slowly turns to a less delay.
I will put a spin driver togheter this weekend.
P.S if you wonder what the %01<<8 is after DP, that is the bit to set to select what transistor (1 of 6) that should sink current.
Here is version 0.6, it does not allow a spin program to send the ascii yet.
But you can change the text to anything you want as long it's 0-9 and A-Z
It's very easy to get lost in the code due to the self modifying.
The ascII text "HELLO9" is a table.
The bit for what sink transistor to use is a table.
The font is a table.
{{
*****************************************
* LED driver v0.6 *
* Author: Tony Philipsson *
* Copyright 2011 Electrons Engineering *
*****************************************
}}
CON
CLK = 4 'pin for clock (P2)
LAT = 2 'pin for latc (P1)
SER = 1 'pin for serial (P0)
A1= %1<<19 'LED Segments
A2= %1<<20
B= %1<<21
C= %1<<22
D1= %1<<23
D2= %1<<10
E= %1<<11
F= %1<<12
G1= %1<<6
G2= %1<<2
H= %1<<13
I= %1<<14
J= %1<<15
K= %1<<3
L= %1<<4
M= %1<<5
DP= %1<<7
PUB LedDisplay (text)
cognew(@asm_entry, text) 'launch assembly program in a COG
DAT
org
asm_entry mov dira,#7 'make pin 0, 1, 2 pin an output
mov outa,#0 'set all pins to off
main mov digit,#6 'we have 6 digits to multiplex
movs textpnt,#mytext 'reset the text pointer
movs sinkpnt,#sink 'reset transistor sink table
loop1 movs fontpnt,#font 'reset font pointer
textpnt add fontpnt,0-0 'add ascii code that text pointer have, to font pointer
sub fontpnt,#48 'subtract as our ascii table start at char(48)
nop 'needed as above code mod code below
fontpnt mov serial,0-0 'start a new serial data
sinkpnt add serial,0-0 'fuse in the transistor sink bit.
mov bit_test,#1 'reset bit mask
shl bit_test,#24 'we have 24 bits to shift out
loop2 test serial,bit_test wz 'test serial data bitwize
muxnz outa,#SER 'answer in z, use it to set Serial pin
or outa,#CLK 'turn pin on (clock)
andn outa,#CLK 'turn pin off (clock)
sar bit_test,#1 wz 'shift right
if_nz jmp #loop2 'if not zero, jmp
or outa,#LAT 'turn pin on (latch)
andn outa,#LAT 'turn pin off (latch)
mov delay, #500 'delay cycles
shl delay, #3 'make it a 8 times bigger value(use #10 for slowmotion)
loop3 djnz delay,#loop3 'a slight delay could not hurt before next digit.
add sinkpnt,#1 'next digit
add textpnt,#1 'next text char
djnz digit, #loop1 'have we done 6 digits?
jmp #main 'restart
mytext long "HELLO9"
font long A1+A2+B+C+D1+D2+E+F+J+M '0
long B+C '1
long A1+A2+B+D1+D2+E+G1+G2 '2
long A1+A2+B+C+D1+D2+G2 '3
long B+C+F+G1+G2 '4
long A1+A2+D1+D2+F+G1+K '5
long A1+A2+C+D1+D2+E+F+G1+G2 '6
long A1+A2+B+C '7
long A1+A2+B+C+D1+D2+E+F+G1+G2 '8
long A1+A2+B+C+D1+D2+F+G1+G2 '9
long 0,0,0,0,0,0,0 'unused
long A1+A2+B+C+E+F+G1+G2 'A
long A1+A2+B+C+D1+D2+G2+I+L 'B
long A1+A2+D1+D2+E+F 'C
long A1+A2+B+C+D1+D2+I+L 'D
long A1+A2+D1+D2+E+F+G1+G2 'E
long A1+A2+E+F+G1 'F
long A1+A2+C+D1+D2+E+F+G2 'G
long B+C+E+F+G1+G2 'H
long I+L 'I
long B+C+D1+D2+E 'J
long E+F+G1+J+K 'K
long D1+D2+E+F 'L
long B+C+E+F+H+J 'M
long B+C+E+F+H+K 'N
long A1+A2+B+C+D1+D2+E+F 'O
long A1+A2+B+E+F+G1+G2 'P
long A1+A2+B+C+D1+D2+E+F+K 'Q
long A1+A2+B+E+F+G1+G2+K 'R
long A1+A2+C+D1+D2+F+G1+G2 'S
long A1+A2+I+L 'T
long B+C+D1+D2+E+F 'U
long E+F+J+M 'V
long B+C+E+F+K+M 'W
long H+J+K+M 'X
long H+J+L 'Y
long A1+A2+D1+D2+J+M 'Z
sink long %10,%01,%10<<8,%01<<8,%10<<16,%01<<16 'what transistor to sink.
bit_test res 1
serial res 1
digit res 1
delay res 1
I got mine today. Will try to play with them tonight. I do have an idea if you're open to suggestions...
How hard would it be to make a version that could also drive the 16 LEDs on the right side of the PPDB? This would also allow us to create bargraphs or control each LED independantly without using up any other Prop Pins.
Or maybe just make an additional board that plugs directly into the LED headers and gets it commands from the first board you made.
I removed the ST chip L293 from prop board just in case.
I plugged in my module so the 6 bottom pins match in the 6 bottom socket,
the one top pin out 17 from my module will hang in the air,
And it works just fine, the 16led bargraph on the right side of board lights up.
ofcource a simple driver (non multiplexing) need to be written.
as the bottom 6 pins are not used in this bargraph mode.
Thanks for the board Tony. I haven't gotten her working just yet but will try again this evening. As a solderphobe, on-board female headers would greatly improve this board. Good luck with the product.
I include male angle pins, but NOT solderd on so you can use something else, or just simple solder wires in place
The 17+6 straight pins are of cource still soldered on.
I have 1 left. (after schill bought two)
attached version 0.88 of driver, now support dots.
If someone needs one right away, PM me. I'm not using mine at the moment. I will sell it for the same price I paid for it: $19.50 including shipping to the US.
I have been busy with "real" work, so a slight delay as i decided to do a redesign where I only use 1 pin instead of 3.
Below picture shows the idea of using short and long CLKs to also effect the data line as it's have a transition delay due to res and cap.
Latch not shown but will use even longer delay with higher Res value.
As mater of fact let me work on it right now and I will try to get an order the PCB by tomorrow, so I should have them ready in 7-10days.
I'm done with the new design.
It now uses small signal mosfets instead of transistors, so no need for resistors on gates.
It uses 1k5 Ohm and 2200pF to buffer Serial Data and 33kOhm and 2200pF to buffer Latch.
Side effect is that the last bit sent will be zero, but that is OK as it only need to use 23 out of 24 pins.
Gate pins from 595 to mosfets are now spaced at every 4th bit, make it easier in the software-loop to simple shift it.
I will create a new post when I have these ready to be sold, with a paypal button to place order.
Should be around July12
Thanks for emailing me Tony, I was not previously a member of this forum.
My Shift-1 protocol for driving a shift register from a single digital output is a novel way for you to have chosen to make this multiplexed driver, but there's no reason that it would not work.
Please keep in mind that it is slower than a "proper" 3 wire solution with DATA CLK and LATCH.However since you only need to LATCH once after loading all 3 shift registers it should still be pretty quick.The pin timings in uS are shown below in the diagram, and more info on the timings etc can be found on this page;http://romanblack.com/shift1.htm
I'm done with the new design.
It now uses small signal mosfets instead of transistors, so no need for resistors on gates.
It uses 1k5 Ohm and 2.2pF to buffer Serial Data and 33kOhm and 2.2pF to buffer Latch.
Side effect is that the last bit sent will be zero, but that is OK as it only need to use 23 out of 24 pins.
Gate pins from 595 to mosfets are now spaced at every 4th bit, make it easier in the software-loop to simple shift it.
I will create a new post when I have these ready to be sold, with a paypal button to place order.
Should be around July12
Any progress update? I'd really like to get my hands on a few of these!
I got pcb yesterday, I had the parts here and assembled 4 but I ordered 2.2pF by mistake instead of 2.2nF (a 1000 difference)
So when I get the replacement caps in in 3-4 days I can ship these new ones out.
I have been toying with this board on and off for a while now. Finally got around to soldering on headers today. Something I haven't figured out yet is a good technique for displaying a byte sized integer variable... Can anyone shed some light on a way to accomplish this? I feel like I am overlooking something simple. Thanks in advance.
OMG Simple_Numbers to the rescue! So obvious!
For the other noobs out there:
I got pcb yesterday, I had the parts here and assembled 4 but I ordered 2.2pF by mistake instead of 2.2nF (a 1000 difference)
So when I get the replacement caps in in 3-4 days I can ship these new ones out.
Any update on availability of the new driver boards?
I sent it to you two days ago but your email does not work ("Delivery to the following recipient has been delayed")
maybe it blocks zip files, so here they are:
Comments
Do you have a demo for the test driver you sent me? I don't know what parameter to use in "text".
I know I can get the display to work using the 74HC595 drivers in the OBEX but it would take two cogs.
I'm not sure if you need to change the headers on the new boards. I think it's a matter of personal preference.
Thanks for making these.
Duane
The 17Ledtest.spin is close to what a driver will be, but it does not pharse ascII from spin yet.
Just include the above font from post #22 and it's close.
And of course a real driver it does not need the large delay that slowly turns to a less delay.
I will put a spin driver togheter this weekend.
P.S if you wonder what the %01<<8 is after DP, that is the bit to set to select what transistor (1 of 6) that should sink current.
Thanks. I now realize the parameter "text" isn't used yet.
I certainly don't expect you to have to write a driver for this board. I feel I got my money's worth from the hardware any software is bonus.
I think I understand your code a bit better now. I might try modifying it.
Duane
But you can change the text to anything you want as long it's 0-9 and A-Z
It's very easy to get lost in the code due to the self modifying.
The ascII text "HELLO9" is a table.
The bit for what sink transistor to use is a table.
The font is a table.
I got mine today. Will try to play with them tonight. I do have an idea if you're open to suggestions...
How hard would it be to make a version that could also drive the 16 LEDs on the right side of the PPDB? This would also allow us to create bargraphs or control each LED independantly without using up any other Prop Pins.
Or maybe just make an additional board that plugs directly into the LED headers and gets it commands from the first board you made.
I plugged in my module so the 6 bottom pins match in the 6 bottom socket,
the one top pin out 17 from my module will hang in the air,
And it works just fine, the 16led bargraph on the right side of board lights up.
ofcource a simple driver (non multiplexing) need to be written.
as the bottom 6 pins are not used in this bargraph mode.
KnightRider with 8 bit pwm would be nice:)
What's the status of these? I'm interested in a couple, but I've waited a while to express this interest.
If if muddies the water any, I think I prefer the male headers, but straight up rather than out to the side.
The 17+6 straight pins are of cource still soldered on.
I have 1 left. (after schill bought two)
attached version 0.88 of driver, now support dots.
I just paypal'd you for two.
Thanks!
I will PM when I get them
Lev
Did you get more in? I'd like to order 3.
Below picture shows the idea of using short and long CLKs to also effect the data line as it's have a transition delay due to res and cap.
Latch not shown but will use even longer delay with higher Res value.
As mater of fact let me work on it right now and I will try to get an order the PCB by tomorrow, so I should have them ready in 7-10days.
Your board finally makes using the LEDs on the PPDB practical.
It now uses small signal mosfets instead of transistors, so no need for resistors on gates.
It uses 1k5 Ohm and 2200pF to buffer Serial Data and 33kOhm and 2200pF to buffer Latch.
Side effect is that the last bit sent will be zero, but that is OK as it only need to use 23 out of 24 pins.
Gate pins from 595 to mosfets are now spaced at every 4th bit, make it easier in the software-loop to simple shift it.
I will create a new post when I have these ready to be sold, with a paypal button to place order.
Should be around July12
Scott
My Shift-1 protocol for driving a shift register from a single digital output is a novel way for you to have chosen to make this multiplexed driver, but there's no reason that it would not work.
Please keep in mind that it is slower than a "proper" 3 wire solution with DATA CLK and LATCH.However since you only need to LATCH once after loading all 3 shift registers it should still be pretty quick.The pin timings in uS are shown below in the diagram, and more info on the timings etc can be found on this page;http://romanblack.com/shift1.htm
Any progress update? I'd really like to get my hands on a few of these!
So when I get the replacement caps in in 3-4 days I can ship these new ones out.
I also have the new retro 7led kit
http://forums.parallax.com/showthread.php?133203-7seg-LED-DIY-Kit-for-sale-with-free-pasm-lessons.
OMG Simple_Numbers to the rescue! So obvious!
For the other noobs out there:
numb:=12
bytemove(@textbuffer,(num.dec(numb)),8)
waitcnt($1F0000+cnt)
Any update on availability of the new driver boards?
maybe it blocks zip files, so here they are:
LED17v2Demo.zip
DebugLED17Demo.zip
Only works with one pin version
They both use pin0 (P0) in software but can be altered to use any other pin.
+ goes to 3.3v and - to gnd.
The official thread for the 1pin version.
http://forums.parallax.com/showthread.php?134106-Updated-17seg-LED-driver-for-PPDB-now-available.&p=1031110&viewfull=1#post1031110