Numeric Display failing to work.
jknightandkarr
Posts: 234
I'm having trouble getting my display to work. Tested the leds with another simple program & they are fine, but on my speedometer program I get only a blank screen, no leds at all are lit. I used the code available here as the base for my program display. What am I doing wrong here? Like I said I checked my led connectrion with a simple display pattern, so I know all are hooked up & work, but in the program I'm working on nothing. Thanks.StefanL38 said...
Hello jknightandkarr,
a SPIN program always starts with the first method o execute code regardless of its name
Your first method is start which just does a cognew with speedometer
Inside method speedometer you have a repeat-loop that is executed endlessly
and that's all what you program is doing. al the other lines of code are NEVER executed.
So this is a real beautiful example that a program does always what's programmed.
And if it does something different then the programmer intended, that the programmer has
not understand his programming YET.
Things like that you can find out by adding debug-output to your code that you get a feedback what and where your prgram is doing
Do you know how to add debug-output over the serial connection ?
if not drop a line
best regards
Stefan
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Post Edited (jknightandkarr) : 12/19/2009 5:10:46 PM GMT
Comments
a SPIN program always starts with the first method o execute code regardless of its name
Your first method is start which just does a cognew with speedometer
Inside method speedometer you have a repeat-loop that is executed endlessly
and that's all what you program is doing. al the other lines of code are NEVER executed.
So this is a real beautiful example that a program does always what's programmed.
And if it does something different then the programmer intended, that the programmer has
not understand his programming YET.
Things like that you can find out by adding debug-output to your code that you get a feedback what and where your prgram is doing
Do you know how to add debug-output over the serial connection ?
if not drop a line
best regards
Stefan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
But you·can·call me micro.
Want to·experiment with the SX or just put together a cool project?
SX Spinning light display·
My overstock is killing me.
PM me for absolutly FREE 8-pin Mini Din connectors.
The Start method will actually start 3, one is disabled & the other isn't actually written yet, but there will be 3 when it's all done. How do you do that debug-output thing. I'm not sure. I think it may be something with the original program. I've tried it & I get no display from it as well. Had messed with it before & got all gobbly gook on the display, but never a display from my program yet.
It's indented, I'll post the program later, so you can see it.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Post Edited (jknightandkarr) : 12/19/2009 5:24:16 PM GMT
You have to adjust PST.EXE to 115200 baus 8N1 to get the correct characters
best regards
Stefan
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
Here is my program. I had to zip it up & post it, for some reason I couldn't access it unzipped.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
best regards
Stefan
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol
What I see right away is your Start routing launches the Speedometer routine. The Speedometer routine then perpetually initializes some of your vars in a non-terminating repeat loop.
The command that launches the display multiplexer (ShowValue) is actually after this endless loop so it will never execute. Even if the display was started, you are not sending it any value to show (the SetValue) routine.
Try out and study the demo and that came with the seven-segment functions you got from Obex and I think you'll understand why you're having problems.
Steve
I just noticed that a section in my code wasn't indented, so that's probly one source of the issue. Thanks for the help everyone.
Joe
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm going insaine. It's SOOOOOO much fun. lol