Syntax:
HserPrintByteCRLF user_data [, 1 | 2 | 3 | 4 ]Command Availability:
Available on all microcontrollers with a USART or UART module.
Microchip PIC supports USART1 and 2.
Atmel AVR supports USART 1,2,3 and 4.
Enabling Constants:
To enable the use of the USART these are the enabling constants. These constants are required. You can change the USART_BAUD_RATE and to meet your needs. For addition USART ports use #define USARTn_BAUD_RATE 9600 where n` is the required port number.
'USART settings for USART1
#define USART_BAUD_RATE 9600
#define USART_TX_BLOCKING
#define USART_DELAY OFFExplanation:
This command will send a byte given by user_data using the hardware USART module and then send the ASCII codes 13 and 10. ASCII codes 13 and 10 equate to a carriage return and line feed.
Example:
'This program will send the status of PORTB through the hardware serial module. HserPrintByteCRLF 65 ' Will print a single A on the terminal ' <<< the HserPrintByteCRLF instruction HserPrintByteCRLF "A" ' Will print a single A on the terminal
Key line: HserPrintByteCRLF 65 — sends the byte value 65 (ASCII A) followed automatically by a carriage return and line feed, saving the two separate HSerSend calls that HserPrintByteCRLF combines into one.
See Also:
- HserPrintCRLF — sending only the carriage return and line feed, with no data byte
- HSerSend — sending a raw byte with no automatic CR/LF

