Updated 17seg LED driver for PPDB now available.
tonyp12
Posts: 1,951
Video of it here:
http://youtu.be/LriHbhNR0TI
Data and Latch are extracted from the Clock, as the clk does not only go low/high but have different durations.
You control it from spin the same way as the first version.
A new 2nd updated version that uses no wires, hardwired to use P0.
Cost: $16.95 each ($2.95 s&h)
To order one:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=895CQGPYKCHTJ
http://youtu.be/LriHbhNR0TI
Data and Latch are extracted from the Clock, as the clk does not only go low/high but have different durations.
You control it from spin the same way as the first version.
A new 2nd updated version that uses no wires, hardwired to use P0.
Cost: $16.95 each ($2.95 s&h)
To order one:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=895CQGPYKCHTJ
Comments
Attached is a real-time debugger of hub ram, real useful as to monitor 3 spin variables in real-time shown as Hex (00-FF)
16bit can be shown by pairing two, and a single 24bit would use all 6 digits.
What to debug can be changed even after your program have started, just insert a new: hub1 := @xxxxx etc
In pasm to show cog ram you would insert a wrbyte at a debug point to write to the address pointed to by hub1-hub3.
I have enough pcb boards to make 50 more of these, so don't be shy with your orders (ships worldwide)
A stripped down verison of the pasm driver is used, maybe easier to follow what it does (open attached file)
Nice work ... it will cleanup a mess of wires in that corner of my PPDB.
I am afraid I am in the same boat as Q'bert, I completed the order without specifying the headers. I will take mine plain, and I will do the soldering.
TNX
Received my board today. Nice work. Thanks!
Yesterday, I started a project using the PPDB's L293D motor driver and I thought it would be a good chance to use the board's LED display.
The demo code worked fine but when I went to add the display code to my motor control code, the display only displayed "9B" in the first two characters with a few quickly flashing segments on some of the other characters.
The problem turned out to the passing of a byte address to the LED object. With my other code included the buffer "textBuffer" was no longer long aligned. Since this address is what gets passed to the PASM section with par, the address ends up being off by a few bytes when it's not long aligned.
There's an easy fix to this. Just add the word "long" before the buffer to force it to be long aligned.
This same problem is present in the 3-pin version of the code.
I'll be making a similar post in the 3-pin version thread. The there pin version also has some issues with the way the I/O pins are set in PASM.
I cleaned up the driver too, digit interval is now a fixed 2mS for the multiplexing.
That way I don't have to worry that some bits take 1uS and some take 15uS but now still get even glow on all LED digits as with multiplexing that is important
It also have overflow error and show all E's if value is above the 6 digits decimal can show.
Just ordered one.
Do you get PM's?
I received my board, (and thanks for the freebie), and I have a problem.
I installed it on my PPBB and downloaded the demo code. It did not do anything for 30 seconds. I then smelt the magic smoke wanting to come out of some component. Pulled the plug to investigate.
It looks like two of the shift registers where installed backwards. I would have send a picture, but the PM software does not allow it.
I will send you another one, weird that I did not see that the two IC to the right are wrong.
Hint to others: it uses 3.3v on + as Props 3.3v output will not work if the IC are on 5v (below the 70% cmos standard)
Jim
Now with no wires and works with both 3.3V and 5V
It have two pairs of holes so you can still use the power rail underneath with jumper wires.
HINT: monitoring values in pasm have always been a little harder, as you probably already have PAR/mailbox setup that you don't want to mess with.
LED17.Display ($7FFC) 'start debug_decimal_driver with a brute address (should be safe most of the time)
...
wrlong myvalue, _x7FFC 'pasm debug without using par offset
How would I purchase one?
Can you supply a populated board? If so how much would that cost?
If not is there a BOM for the needed parts, and where could I get the schematic / assembly instructions?
Thanks for your help
Tom
Tony,
Thanks; order placed.
Tom
I modified his PASM driver so that it could be used with SimpleIDE C programs, and wrote a couple of simple functions for it: Start, Test, and Clear. They along with a demo (main in the C program) are listed below along with the modified Spin/PASM code.
My intent is to build on this to add other C functions to be able to display general text and numerical results. Once I've done that, I want to make a library (libLED17) that can be included in any C program. That will take a while for me to do that, so I wanted to get my initial work on the forum.
The biggest issue was that I could not figure out a way to use Tony's constants from the Spin program (A1, A2, B, C, etc) to be used to calculate the values for all of the characters in the PASM. So I ended up calculating them and hard coding the values for all the longs in the PASM. A little bit of work, but it was successful. I also just set the PASM to use pin 0 since that's the pin the board connects to. I used Tony's format (CLKpin long 1<<0), but I assume that (CLKpin long 1) would have worked. I also did not change the hard coding for 80MHz that Tony used.
To use this, Copy the attached Spin file to the SimpleIDE directory you want. I used My projects/LED17. Make it easy to find since you will add the file to the project.
Then open SimpleIDE, select newproject and name it LED17.
Then delete all of the new project code that is entered into the editing window and copy the C code listed below into that window.
Then click on Project at the top of the screen and select Open Tab to Project. Set file types to Spin, and click on LED17v2x.spin. That code should open in the editing window in its own tab.
At that point you can save the file (to the LED17 folder). Then click on the load-ram-and-run button (after making sure the PPDB is connected and powered on and that its port shows up in the upper right hand corner window.) That will load the project to ram and it should display READY on the LEDs for about 1 second, then cycle through the characters, and finally clear the LEDs. Note that the code for test does cycle through lower case letters, but they will display as upper case.
I am relatively new to both C and Spin/PASM programming. Some of my coding is awkward. Any suggestions are gratefully accepted.
Tom
LED17v2x.spin
The C main and functions:
The spin/PASM code:
I've also cleaned up some of the C programming (I'm learning about strings in C).
Tom
-Mike
Do you know where the schematic is for these led's on PPDB?
Led part # is 3292AB
Thank you!
Merry Christmas!
They are common cathode. Ground the cathode and pull the segment high. Resistors are included
Thank you.
How do you wire it?
Merry Christmas!
I posted one previously here: http://forums.parallax.com/discussion/111067/sixteen-segment-display-on-popeller-professional-development-board
Here is the pcb diptrace file.
This is the latest version that don't use any wires.
Buffer (SN74LV1T34DBVR) so it will work with any power-rail voltage.
Dual n-mosfet CPH5617-TL-E
Two resistor-capacitor network as to trick data and latch pins to not see the fast clock signals, as pcb only uses fast, slow and super-slow clock signal.
Tony, Thanks for sharing the Diptrace file!