We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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 }