not clear on how to serial talk propeller
Gamekiller
Posts: 5
hello all
a group of friends with my self are useing the propeller as a interface to sensors and motor controler. Now we tring to get the mirror serial spin. The data that is sent back to the PC is garage and we can make heads or tails of what we are getting. In the end we are tring to make a firmware with API so a PC can send commands and get tellemetry data from a set of cogs and a cog for motor controlling.
The plan we have will use a cog as com talk and one to schdule tasks.
We just got the propterm app but have not have time to test it.
Any advice from those that have played with serial com to pc world be great.
Andy
www.jambot.org
a group of friends with my self are useing the propeller as a interface to sensors and motor controler. Now we tring to get the mirror serial spin. The data that is sent back to the PC is garage and we can make heads or tails of what we are getting. In the end we are tring to make a firmware with API so a PC can send commands and get tellemetry data from a set of cogs and a cog for motor controlling.
The plan we have will use a cog as com talk and one to schdule tasks.
We just got the propterm app but have not have time to test it.
Any advice from those that have played with serial com to pc world be great.
Andy
www.jambot.org
Comments
What serial I/O driver are you using on the Propeller? You may need to post your program and a schematic.
Serial I/O between a PC and a Propeller does work.
It's not complicated, but you can do it so it works and you can try to do it so it doesn't work.
The PC and the Propeller have to talk the same speed and same polarity signal and you have to use either a USB to serial adapter
or some kind of RS232 interface (like the MAX3232).
@ Gamekiller : Put your current program to one side and write a short Propeller program which firstly sends data out of a serial pin so you can check the PC receives it. Once that's done you can move on to echoing back what's received. I'd start with "FullDuplexSerial", that worked like a charm when I used it. Then you can move up to using MirrorSerial if that's what you need.
Once you're confident you can do serial it makes integrating with your intended program so much easier; you'll have taken a number of unknowns out of the equation if you are having problems, and you can always drop back to your simple echo program to confirm the serial is still working as it's meant to.
We have propclip for all the projects. So we are using serial to USB. The setup are right for the propeller to PC aka buadrate and all that. My brother inlaw is coding a lot of this for me and i helping him with this step.
We been using linux and wine to program but are switching over to a Mac with windows on so that may work a bit better. But the problem was when we looked at the raw data sent to the PC it just did not make any sence.
I have some code for you in a bit but we are using the fulldeplex and the serialmirror code from the object exchange.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
to mod or not mod. That is the qestion.
www.jambot.com
Hence the suggestion to write a simpler program which sends known data, starting with a single repeated character, once a second or so.
If serial is working but the data you are getting does not make sense, you may be sending the wrong data because of a coding error. Not sure how we can help you with that problem without further information.
Firstly, send a known data stream ( a simple text message ) and confirm that works and what is received makes sense.
Let me get the code so you call can see it.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
to mod or not mod. That is the qestion.
www.jambot.com
For a 5 MHz crystal write this in the CON section:
Andy (also)
My dev team is a big windows haters group. We all ran linux and now we all switched to Macbook pro.
This evening i going to try the code from above provided by hippy and i report back if it worked.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
to mod or not mod. That is the qestion.
www.jambot.com