trying to control the PSC with the prop
Well i am trying to control the PSC with the prop but i can not seem to get it to work could somone look at my code and see if i am doing some thing wrong.
Post Edited By Moderator (Chris Savage (Parallax)) : 5/10/2007 3:59:07 PM GMT
Post Edited By Moderator (Chris Savage (Parallax)) : 5/10/2007 3:59:07 PM GMT
Comments
1) You're declaring the control strings as "long". This will put one character per long word (4 bytes) with the other bytes zero. You want to declare them as "byte".
2) UART.tx will transmit one byte. In your "main" routine, you'll transmit the value "scsf1" as a single byte, that's all.
3) You may want to use UART.str and pass it the address of a sequence of bytes. These byte strings HAVE to end with a zero byte. For example, you could have the declaration 'scbm1 byte "!SC",crs1,ra,mb,$0D,0' in your DAT section and then do "UART.str(@scbm1)" to send the string.
4) Why are you using a mode value of 2 in your start() call? I thought the PSC used normal (non-inverted) mode for both transmit and receive (I could be wrong!). That would result in a mode of zero.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My computer, http://forums.parallax.com/showthread.php?p=630466
Post Edited (boeboy) : 5/30/2007 7:11:30 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
Post Edited (boeboy) : 5/14/2007 8:05:25 PM GMT
:EDIT:forgot the code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
Are you using a series resistor on the I/O line? Due to the design of the PSC it may not function with a series resistor which would typically be required on the Propeller. This may cause an incompatibility with this particular product. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
It looks like the 2nd call to the serial I/O should be UART.str().
How about either hooking up a serial LCD display or using a little tv with a video output or some other kind of debug display
so you can insert messages that say "I'm here and this worked" or "here's the value ..."?. It's not very useful to just say
something didn't work. What happened and when? Even a couple of LEDs are handy to show you what progress you've made
and when things happened or didn't happen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
Post Edited (boeboy) : 5/17/2007 10:17:24 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
Thankyou.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My computer, http://forums.parallax.com/showthread.php?p=630466
·· I did some testing this morning and I can talk to it just fine. My concerns are that in order to get enough pull-down I had to use a 220 ohm resistor, much less than we recommend for connecting 5V devices to the Propeller. As with the GPS interface there are no fancy or elaborate schemes for the connection, just a simple in-line/series resistor. Using the attached code I get ‘1.4’ on my terminal screen when running this program. Again, the current is what I would be concerned about. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Post Edited (KC8DKT) : 5/30/2007 10:30:18 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My computer, http://forums.parallax.com/showthread.php?p=630466
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My computer, http://forums.parallax.com/showthread.php?p=630466
·
· Dumb question,· I did some messing around with run'n the prop on 5v just for fun back then as well.· It was only talking "no leds being powered from the prop" and thing seemed to run just fine.·
·
· What would be better·
··
· Powering the prop from 5v to drive a 5v line "this would be easier on the diodes right?"··· OR·
· Powering the prop from 3.3v to drive a 5v line with less than a 300 ohm resistor?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
with full being FullDuplexSerial
but when I try to use a string in a data block
·
and send it like this
It does not control the servo.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My computer, http://forums.parallax.com/showthread.php?p=630466
Post Edited (boeboy) : 5/31/2007 10:02:31 PM GMT
If you have it handy, would you give me an idea of the best way to wire the PSC up? I have read through the 5V interface sticky and there are a lot of options there, but I don't have the background to evaluate which would be better/safer. I hope you will also be able to supply specific part numbers for the transistors (if they are needed).
Thanks
I believe I was already working on such an interface and there was some issue causing problems. If I get a chance tomorrow I will test my theory and post a schematic. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thanks for the response, I'm ordering parts soon so I wanted to be sure I had the correct components on hand after I got through the labs.
Post Edited (grindel) : 6/4/2007 11:02:32 AM GMT
I have some ideas, but they are based on some possibly incorrect assumptions on how this connection works.·
What I can gather is that the·"no data transfer" state of·the PSC is a steady +5V.· I'm not sure where the circuit grounds in this case. (high resitance ground in one or both chips?)· When one side wants to transfer data, it grounds the signal to a low resistance ground?
I'll share·what I have come up with if the above assumptions are correct.
The other option I have thought about is desoldering/cutting out the LED so I can use a 10K resister as with other 5V devices.
I just·got my Prop working so I'll try out some ideas and report back as soon as I get parts in.······
I haven’t had time lately to test it…without some sort of level transitioning interface though it’s not going to work. Using a resistor large enough isn’t going to allow it to go low enough to register a logic 0. I remember testing a transistor interface for the RS-232 interface thread in the Completed Projects Forum. That worked, but again, at 5V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support