Program Problem?
jknightandkarr
Posts: 234
I got my Propeller wired up to numeric LED displays & tried it using Seven-segment Test.spin found here on the object exchange.
obex.parallax.com/objects/142/
and all I get is odd ball displays. Looks to me they are jarbled up. So I tried a simple test program to run through all my digits one at a time, displaying 0 to 9, & ending with the Decimal Points flashing back & forth before restarting to test my wiring job. The program displayed exactly what I wanted, so I assume it's problem with the seven segment program i downloaded. What part I don't know I've tried a few things & so far nothing fixes it. I got my segment/digit information, namely
directly from the SevenSegment.spin file, modified the DigSel to take it to 4 digits in my test program, so I know that's not the problem with the Seven-segment Test.spin I tried to use only the SevenSegment.spin & added my I/O pin usage information, a value to display, adjust config values as needed & get nothing but a blank display, so neither program is working correctly for me. If someone can help me figure this out, I'd be greatfulll, because I'm confused.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
obex.parallax.com/objects/142/
and all I get is odd ball displays. Looks to me they are jarbled up. So I tried a simple test program to run through all my digits one at a time, displaying 0 to 9, & ending with the Decimal Points flashing back & forth before restarting to test my wiring job. The program displayed exactly what I wanted, so I assume it's problem with the seven segment program i downloaded. What part I don't know I've tried a few things & so far nothing fixes it. I got my segment/digit information, namely
DAT 'Common cathode 7-segment displays are activated by bringing the cathode to ground DigSel byte %1110 byte %1101 byte %1011 byte %0111 Digit0 byte %00111111 Digit1 byte %00000110 Digit2 byte %01011011 Digit3 byte %01001111 Digit4 byte %01100110 Digit5 byte %01101101 Digit6 byte %01111101 Digit7 byte %00000111 Digit8 byte %01111111 Digit9 byte %01100111
directly from the SevenSegment.spin file, modified the DigSel to take it to 4 digits in my test program, so I know that's not the problem with the Seven-segment Test.spin I tried to use only the SevenSegment.spin & added my I/O pin usage information, a value to display, adjust config values as needed & get nothing but a blank display, so neither program is working correctly for me. If someone can help me figure this out, I'd be greatfulll, because I'm confused.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Comments
Well the code is the same as in the object actually, it remains basically unchanged but I'll add it.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Did you wire it up by yourself (breadboard or prototyping PCB) or is it this big propeller board?
In the first case you maybe wired it differently than expected by the program? The digit pins should switch a transistor to ground when pin is low. The segment pins are high when the segment shoult light up. If the digit part is wrong then two things can happen:
The digit is usually "on" and only one of the 4 digits is off (if the transistor switches in the wrong case - output = 1) or you have a reversed display (the segments which are off show the number) in case your transistor is connected to supply voltage instead.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Without seeing the complete code it is guessing in the fog
best regards
Stefan
My codes i used are on the object exchange.
I really didn't modify it, other then dabble with come things & nothing worked, so non of that was saved.
I think its one or the other. I don't think there's both on the same chip. My leds are all Common Cathode.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
I think I found the issue. The highdigitpin & lowdigitpin along with Seg0Pin & Seg8Pin are reversed. After swaping places in the Seg0Pin & Seg8Pin, my display is now un jarbled. Now I just have to adjust the high & lowdigitpins to get the order fixed.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol