Serial Connector (3.5mm)

Schematic

PCB

Output serial via a 3.5mm jack socket to an AXE027 USB cable

The following program will output serial data at 2400 baud which reports the incrementing value of the byte variable 'b0' every second. As the serial signal goes to a 3.5mm jack socket which an AXE027 USB to serial cable will be connected the polarity of the serial is 'normal' so an 'n2400' baud rate is used. Because an 8-bit byte variable is used, after the number reaches 255, the next increment will take its value to zero.

Code Example:
main:	serout B.1, n2400, ( #b0, CR, LF )	; Output a number value
	pause 1000				; Wait for 1 second
	b0 = b0 + 1				; Next number to output
	goto main				; Output the next number
Copy Code Submit an Example

Create Module

No Image Selected

Bill of Materials

DescriptionCodeQty
3.5mm stereo jack socket CON039 1 Buy Now
10k resistor (pack 100) RES10K 1 Buy Now
22k resistor (pack 100) RES22K 1 Buy Now

Simulation

No Image Selected

Submit Your Own Code!

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