Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Dashboard Port Decoder (http://www.chiefdelphi.com/forums/showthread.php?t=44830)

whytheheckme 03-03-2006 12:30

Re: Dashboard Port Decoder
 
I just obtained an old basic stamp that can be programmed using basic stamp. Right now it can obtain data from an old FRC, but just simple stuff. I am expanding it to work with the real FRC.

If you have that C code, that would still be helpful I think.

Thank you,
Jacob Komar

whytheheckme 03-03-2006 23:05

Re: Dashboard Port Decoder
 
1 Attachment(s)
After a day's work on this, this is how far I got.

The Basic Stamp can see the dashboard port, because it doesn't get hung on the 255,255. My problem now is capturing the correct packets. Do I need to name the input varibles the same as they are in the specification sheet? Even if they do, the one that I care about, Switches_A, doesn't pass bit0, which is just p1_trig. Does anyone see any syntax errors?

Just remove the .txt at the end of the file name to get the bs2.

Jacob Komar

whytheheckme 04-03-2006 16:04

Re: Dashboard Port Decoder
 
OK!

I got the stamp to read values from the OI packet, so when I press the trigger, I can make the logic value of a pin high; when I let go, it will go to low. As soon as I move the jumper over to RC next to the dashboard port, and write my code to check the ctrl_a, b and c to suck a certain byte (PWM 1, for instance,) it isn't reading properly. For some bytes, only the lows will work, but when i try to switch it to a high, i get a 2.7 voltage, and other bytes are just 0 all the time. Any suggestions?


Jacob Komar

Rickertsen2 04-03-2006 17:13

Re: Dashboard Port Decoder
 
Quote:

Originally Posted by whytheheckme
OK!

I got the stamp to read values from the OI packet, so when I press the trigger, I can make the logic value of a pin high; when I let go, it will go to low. As soon as I move the jumper over to RC next to the dashboard port, and write my code to check the ctrl_a, b and c to suck a certain byte (PWM 1, for instance,) it isn't reading properly. For some bytes, only the lows will work, but when i try to switch it to a high, i get a 2.7 voltage, and other bytes are just 0 all the time. Any suggestions?


Jacob Komar

glad to hear it's working... at least a little bit

post the most recent code. I might have an idea about why it might not work

You seem to be on a good track with the BASIC stamp, so i'm not going to bother with the C code.

whytheheckme 05-03-2006 15:11

Re: Dashboard Port Decoder
 
1 Attachment(s)
Here is the latest code. Right now its written to capture the first Packet of the RC code and the 3rd byte, which is PWM 1. When PWM 1 is 0, the output 7 is 0 V, but when it gets above 150 (or whatever it is), it jumps all around.


Remember to remove the .txt

Thanks,
Jacob Komar

Rickertsen2 05-03-2006 20:25

Re: Dashboard Port Decoder
 
Quote:

Originally Posted by whytheheckme
Here is the latest code. Right now its written to capture the first Packet of the RC code and the 3rd byte, which is PWM 1. When PWM 1 is 0, the output 7 is 0 V, but when it gets above 150 (or whatever it is), it jumps all around.


Remember to remove the .txt

Thanks,
Jacob Komar

Sorry i took so long to respond. In the version you posted above, there is an extra endif on line 76. It shouldn't even even let you compile that. It won't let me.

whytheheckme 05-03-2006 22:12

Re: Dashboard Port Decoder
 
Oh, I'm sorry about that. I had adjusted the code for the OI, and I readjusted it for the RC so I could post it. I must have uncommented too many things. The version that I used yesterday for the RC decoder compiled properly. I tried multiple ways of using if statements to check those control bits, so I had ifs all over the place. I must have uncommented it by accident.

Jacob Komar

whytheheckme 06-03-2006 10:40

Re: Dashboard Port Decoder
 
3 Attachment(s)
I GOT IT!!!!!!!!!

I don't know how I did it, but I got it. I updated the code, (not much of a difference,) but now it works. I also attached the code I downloaded to the FRC (I did it in easyC so that I knew it wasn't my crappy C coding that was the problem :o ). YAYAYAYAYAYAYAY!!!!!!!

My xilinx board is currently on the truck to my house, so later on I can work on the xilinx code for decoding the stuff that comes out of my stamp.

I'll keep you guys updated!!!

Jacob Komar

whytheheckme 06-03-2006 16:38

Re: Dashboard Port Decoder
 
I lied. Only PWM 1 works, and only a little bit at that. Sometimes, the light stays solid at 5 Volts, but sometimes it blinks (between 0 and 30 V.) Its very confusing. Any other byte from the packet produces no output. Any assistence is greatly appreciated.

Jacob Komar

Rickertsen2 06-03-2006 18:14

Re: Dashboard Port Decoder
 
Quote:

Originally Posted by whytheheckme
I lied. Only PWM 1 works, and only a little bit at that. Sometimes, the light stays solid at 5 Volts, but sometimes it blinks (between 0 and 30 V.) Its very confusing. Any other byte from the packet produces no output. Any assistence is greatly appreciated.

Jacob Komar


As i understand things, you have a Basic stamp connected to the OI. The Basic stamp is also connected to an LED. Is this correct?

How does a ligh blink at 30v? do you mean 30hz? What is it that you wrote in easy C? I thought you were using a Basic Stamp? I'm confused.


All times are GMT -5. The time now is 05:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi