serial port
soyyam
Posts: 3
if i wanted to connect the bs2p40 to a video overlay device using a serial cable which pins would i need to use?· Sout and Sin only work connecting to the computer?
thanks
thanks
Comments
One other caveat about using SERIN/SEROUT to pin port 16. I stand to be corrected, but as I remember, the BAUDMODE is LOCKED IN to that of DEBUG (9600, 8, N, 1). Said differently BAUDMODE will be ignored if pin port 16 is used. This is a somewhat hidden aspect of using it, and thus why I mention it. It may not be a problem however, depending on the application.
Regards,
Bruce Bates
If you SEROUT 16, <somebaudmode>, [noparse][[/noparse]"Hi",13]
Then "Hi" will come out at the baud rate selected by the baud mode value.
However, you DO have to have a 'real' RS-232 driver connected to the RX line, so the TX line can use that to modulate itself.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
·· I'm not sure if we're all on the same page, but just to be sure, yes you can set the baud rate to any baud rate that can be used on any other pin, but as for Baud Modes, please note the following text from the PBASIC Help file:
"If the dedicated serial port (Tpin = 16) is used the data is inverted and driven regardless of the baudmode setting."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
And my understanding matches yours, that no matter what the "inverted/not inverted" bit is set to, or the "open/not open" baud mode bit, on pin 16 the result is Inverted, Not Open (in other words, matching what a PC expects to see).
·· Okay, we are on the same page...Sometimes I get lost in the different views on something, and am not sure who's thinking what.· LOL·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
it worked fine using both
1) a BOE, USB, BS2
and
2) standard serial (COM1) connection to a Homework board.
Then I tried running it on a BS2p40 connected via USB to the Professional Development Board, and I can't get it to work.
Any suggestions for debugging, or arcane secrets I should know?
TIA.
·· Since you used the Homework Board (BS2-based) before, and the BOE with a BS2, I am going to assume you're using the same code on the BS2p40.· In this case you probably are using the same baud rate parameters, which between the BS2 and BS2p40 are different.· It would help if you posted your code.· It would also generate more replies to post a new thread in the future.· This one was already taken care of and many people probably wouldn't notice your post.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com