It really depends on what the receiver expects. If the receiving device expects to see an asynchronous serial output (an RS-232 data steam), then the answer to your question is to use the SEROUT command. If the receiving device expects to see a synchronous serial output (data and clock), then you want to use the SHIFTOUT command. Both commands can be found in the PBasic Manual or Pbasic Help file.
There are other commands for output as well, but those two are the main commands usually used for serial data.
Comments
It really depends on what the receiver expects. If the receiving device expects to see an asynchronous serial output (an RS-232 data steam), then the answer to your question is to use the SEROUT command. If the receiving device expects to see a synchronous serial output (data and clock), then you want to use the SHIFTOUT command. Both commands can be found in the PBasic Manual or Pbasic Help file.
There are other commands for output as well, but those two are the main commands usually used for serial data.
General syntax:
SEROUT Tpin {\Fpin}, Baudmode, {Pace,} {Timeout, Tlabel,} [noparse][[/noparse]OutputData ]
SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]OutputData {\Bits} {,OutputData {\Bits}...}]
Regards,
Bruce Bates