Trouble using the 16 segment LED displays on the Prop Prof Development Board
Dave F
Posts: 11
Hi All;
After being inspired by Andy Lindsay's great sensor chapter in Programming and Customizing the Multicore Propeller Microcontroller book (we're gonna have to come up with an abbreviation for this; PCMPM , perhaps), I decided to see if I could create an application which reads the light level with a TAOS tsl230 light sensing chip and reads the value out to the six 16 segment LED displays on my Propeller Professional Development Board.
I am having a problem getting the LED characters to work properly. My problem is that I can correctly display any character which uses only the outside segments, 'O', for instance. But any character which uses any of the inner segments, 'X', for instance, does not display correctly. I am using the SixteenSegment.spin object, Steven Stuart's Sixteen-segment_demo.spin application, and Brandon Nimon's STRINGS.spin object. All of these were downloaded as a group from the parallax object site just a few hours ago.
I have checked that the wiring is set to the default pattern specified in the object; rightmost character cathode on prop pin 0, segment start pin (A1) on prop pin 6, both character and segment pins are wired contiguously. The object call in my code is
led.start(lowChar, numChars, Segment0, true)
Where lowChar = 0
numChairs = 6
Segment0 = 6
So, as far as I can tell, after several wiring inspections, the wiring is correct. A possible confirmation of this is that the same distorted character will scroll unchanged across all six displays.
The calling code appears to be correct.
Any suggestions as to where I might go next? I know this can't be all that difficult, and I am digging through the object code to see how it works, but it is a bit above my current spin skills to trace each step in the object.
Thanks
After being inspired by Andy Lindsay's great sensor chapter in Programming and Customizing the Multicore Propeller Microcontroller book (we're gonna have to come up with an abbreviation for this; PCMPM , perhaps), I decided to see if I could create an application which reads the light level with a TAOS tsl230 light sensing chip and reads the value out to the six 16 segment LED displays on my Propeller Professional Development Board.
I am having a problem getting the LED characters to work properly. My problem is that I can correctly display any character which uses only the outside segments, 'O', for instance. But any character which uses any of the inner segments, 'X', for instance, does not display correctly. I am using the SixteenSegment.spin object, Steven Stuart's Sixteen-segment_demo.spin application, and Brandon Nimon's STRINGS.spin object. All of these were downloaded as a group from the parallax object site just a few hours ago.
I have checked that the wiring is set to the default pattern specified in the object; rightmost character cathode on prop pin 0, segment start pin (A1) on prop pin 6, both character and segment pins are wired contiguously. The object call in my code is
led.start(lowChar, numChars, Segment0, true)
Where lowChar = 0
numChairs = 6
Segment0 = 6
So, as far as I can tell, after several wiring inspections, the wiring is correct. A possible confirmation of this is that the same distorted character will scroll unchanged across all six displays.
The calling code appears to be correct.
Any suggestions as to where I might go next? I know this can't be all that difficult, and I am digging through the object code to see how it works, but it is a bit above my current spin skills to trace each step in the object.
Thanks
Comments
After some investigating, it appears to me that the character tables in the SixteenSegment.spin object, that I downloaded off of
the obex parallax site, may be messed up. When I observed what segments displayed in a given character were missing, and which were not supposed to be turned on, and when I changed the binary values in the object character table, those corrected characters displayed correctly. And when I used the original binary tables out of the object and fed them directly to the 16 segment displays using a simple test program I wrote, the messed up characters showed up in my test. So, unless there is some binary character table translation going on in the object, it looks as if there is a bug in the character tables.
Any feedback?
Determining the binary bit to LED segment correspondence took a while but was a bit like solving a jigsaw puzzle. For instance, to identify the 'tail' on the 'Q' (segment K), it was necessary to compare the binary pattern in the character table for 'O' and 'Q', and to identify the one extra high bit in 'Q' (the tail). Continuing to look for 'minimal pairs' gradually allowed more segments to be identified until finally all the segment-to-bit mapping was identified. Since the code does a contiguous mapping of Prop pins which match the order of the 16 bits in the character map, getting Prop pin to segment relationships was then easy.
The 16 segment LED Display Segment to Prop pin mapping which works correctly on my Propeller Professional Development Board (with the current Sixteen Segment Object) is as follows:
Seg Prop Pin
A1 7
A2 6
B 8
C 9
D1 10
D2 11
E 12
F 13
H 16
I 17
J 18
G2 15
K 19
L 20
M 21
G1 14
With this mapping the downloaded Sixteen Segment object and demo work correctly 'right out of the box'.
Interesting learning experience
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
Propeller-Based Reverse Geo-Cache Birthday Present Project
Glad the information was useful. This has actually been my first series of posts to the forum. I have been one of those silent readers lurking out there for years, however. The quality of info posted here in these forums, by and large, makes it a bit intimidating for me to step up and post stuff for all the world to see. On the other hand, reading the new PCMPM parallax book really inspired me to continue my prop studies, so it was time to get involved. Isn't the PPDB a cool board for trying stuff out?
Dave
Dave D
http://forums.parallax.com/showthread.php/134106-Updated-17seg-LED-driver-for-PPDB-now-available.?highlight=17seg