Serial Comms - What am I doing wrong? Can someone help the noob?
pacman
Posts: 327
Hiya,
Im using the Extended_FDSerial object in an effort to get some simple serial comms working but I seem to be having a problem with the prop recieing data.
I can send OK.
I'm note sure if its a wiring problem, a mode 'problem' (with the way you start FDSerial), a code problem (I'm not using the .WorkDammYouWork method properly), a hardware problem (the level shifter board, the USB to serial cable), or something else....
Does someone have (or could quicly bash out) a TESTED spin program thay would be able to share to allow me to 1)send a 'test' string out the TX pin, 2) check for data (using .RXcheck would do) on the RX pin and 3) spit the answer to 2 out via the SimpleDebug object.
My reasoning is that I can use your working program to check all the external bits.
I have searched the forum (and object exchange) for a 'pre-canned' serial test program but have had no luch with my efforts
(and is it me or is the forum search broken? More than one term {even when seperated with ,} always gives 0 results) - I've even used the Google search function as recommended in the sticky, but still no joy...
Huge thanks in anticipation..
Paul
Im using the Extended_FDSerial object in an effort to get some simple serial comms working but I seem to be having a problem with the prop recieing data.
I can send OK.
I'm note sure if its a wiring problem, a mode 'problem' (with the way you start FDSerial), a code problem (I'm not using the .WorkDammYouWork method properly), a hardware problem (the level shifter board, the USB to serial cable), or something else....
Does someone have (or could quicly bash out) a TESTED spin program thay would be able to share to allow me to 1)send a 'test' string out the TX pin, 2) check for data (using .RXcheck would do) on the RX pin and 3) spit the answer to 2 out via the SimpleDebug object.
My reasoning is that I can use your working program to check all the external bits.
I have searched the forum (and object exchange) for a 'pre-canned' serial test program but have had no luch with my efforts
(and is it me or is the forum search broken? More than one term {even when seperated with ,} always gives 0 results) - I've even used the Google search function as recommended in the sticky, but still no joy...
Huge thanks in anticipation..
Paul
Comments
Don
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
I had similar trouble when I first started using the propeller.
I would recommend·using·the same pins that are used for programing to interface with your serial terminal
Heres an example:
Serial.start (31,30,0,9600)
Its also might be· a good idea to download the parallax serial term for now till you get things working.·
Hope this helps
Plugging my level shifter board straight onto the RX/TX pins (rather than the prop plug) doesn't give me any joy at all...
But substituing my prefered pins (8 & 9) still leave me with the prop only being able to TX not RX.
Does the DuplexSerial module set the RX pin to an input? or do I have to set that external in my code? (I dont see where/how it's getting set in the example?)
Thanks for the help so far
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Don't know the example you talk about, but DIRA of each COG is initialized as 0, so you only have to set the output pins, all other pins are defaulted to input.
So assuming I get my code working using pins 30 & 31 {FullDuplexSerial.Start(31,30,0,9600,)} but then ONLY change the pin definitions in the code {FullDuplexSerial.Start(8,9,0,9600,)} then I _should_ have no other issues?
That is providing that the external hardware is OK.
That is where I think I'm coming unstuck - I can get "Terminal Frequency" working from pins 31,30 but shift them to 8 & 9 and I can only get the prop to TX (it won't RX, no matter how hard I bash on the keyboard). I'm starting to suspect that
my line shifter level board (Futurlec http://www.futurlec.com.au/Mini_RS232_TTL_3V.jsp) only works one way??
In this case you can simply test if the board itself is working. Connect the RX with the TX on the 3.3V side and the keystrokes should be echoed to the terminal program.
Now I know the external line driver board (and thus the USB convertor cable and all other associated wiring) is fine...
Back to more bug hunting....