This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using Max232 and sending info to terminial

I have written a simple A/D program to output details to P4 and a seven seg display attached to Port 5. I wish to transmit this information via the RS232 to the terminal emulator (Hypertermial)but I am having problems with the code to set up the UART. So far I have the following working sections in the program (A/D conversion, Binary - BCD)

This is the code I have so far added to attempt the transmission via RS232

void initialise_serial0_for_baudrate()
{
	BD = 1;		//Enable Baud Rate Generator
	PCON = 0x80;  	//Set SMOD to double baudrate
	T1 = 1;		//Initially set transmitt flag
}
	

void Transmit()
{
	T1=0;		//Clear TI flag
	S0BUF = P5;	//Output information
	while(!T1) {;}	//Wait until transmit flag is set
}

The KitCON515C I am using has a 10MHz Quartz.

Any help appreciated to point me in the right direction. I am trying to send using a 9600 baud

0