- Name:
-
sertxd
- Syntax:
-
SERTXD ({#}data,{#}data...)
Data - are variables/constants (0-255) which provide the data to be output.
- Description:
-
Serial output via the serout programming pin (baud 4800, 8 data, no parity, 1 stop).
The sertxd command is similar to the serout command, but acts via the serial output pin rather than a general output pin, and at a fixed baud rate. This allows data to be sent back to the computer via the programming cable. This can be useful whilst debugging data - view the uploaded data in the PICAXE>Terminal window.
There is an option within View>Options>Options to automatically open the Terminal windows after a download. The baud rate is fixed at 4800,n,8,1 (9600,n,8,1 on X2 parts)
The # symbol allows ASCII output. Therefore #b1, when b1 contains the data 126, will output the ascii characters "1" "2" "6" rather than the raw data 126. The # symbol can also be used with word, bit and input pin variables.
Effect of Increased Clock Speed
Increasing the clock speed increases the serial baud rate as shown below (non X2 parts).
| 4MHz |
4800 |
| 8MHz |
9600 |
| 16MHz |
19200 |
| 32MHz |
38400 |
| 64MHz |
76800 |