HSEROUT break, ({#}data,{#}data...)

Break - is a variable/constant (0 or1) which indicates whether to send a 'break' (wake-up) signal before the data is sent.

Data - are variables/constants (0-255) which provide the data to be output. Optional #'s are for outputting ASCII decimal numbers, rather than raw characters. Text can be enclosed in speech marks ("Hello")


Transmit serial data via the hardware serial output pin (8 data bits, no parity, 1 stop bit).

The hserout command is used to transmit serial data from the fixed hardware serial output pin of the microcontroller.  It cannot be used with the serial download output pin - use the sertxd command in this case. Polarity and baud rate are defined by the hsersetup command, which must be issued before this command can be used.

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 byte '126'.

Applies To:
08M2, 14M2, 18M2, 20M2, 28X1, 28X2, 40X1, 40X2
See Also:
Related Create:

Read EEPROM data and transmit it via serial

Transfer the values stored in EEPROM location 0 to 63 to a serial LCD at 2400 baud

Code Example:
	hsersetup B2400_4, %10	; 2400 baud, inverted polarity

main:	for b0 = 0 to 63	; start a loop
	  read b0,b1		; read value into b1
	  hserout 0,(b1)	; transmit value to serial LCD
	next b0			; next loop
Copy Code Submit an Example

Submit Your Own Code!

You must be logged in to submit code examples. Login now.


  • Login to leave a comment.