' source in /Program Files/Coridium/BASIClib
SUB bbTXD(pin, ch)
) will send a single byte of data that is shifted out as an
asynchronous serial stream on pin
This function is similar to SEROUT, but is a more efficient
implementation. The baudrate for the pin should be set before using bbTXD,
that is done using the bbBAUD(pin) array.
bbTXD will transmit 0-255 as a single byte of data with an added START bit
and trailing STOP bit. As this function is done by the CPU (often referred
to as bit-banging, the program will stay at this instruction until the shifting
is completed. So the processor is consumed during these operations.
Interrupts are also disabled during each byte for these
DIM Astr(10) as STRING
bbBAUD(2) = 19200
' set the baud rate for serial I/O on pin
Astr = "Hello World"
' Send a string of characters serially out pin
Differences from other BASICs
- no equivalent in Visual BASIC
- SEROUT in PBASIC