Implementing a software UART in PIC18F2585

Thread Starter

101

Joined Mar 8, 2008
5
Please I need help on how to implement a software UART in PIC18F2585. Presently I'm using the hardware USART as my control and I need to use the software UART to send the data to the PC. I've gone through the software UART in the C18 Library but it doesnt output the data received on the hardware USART. I've tested with a scope and confirmed that the data gets to the hardware USART only. Please find below a section of my code that calls the software UART:

OpenUART(); // Initializes the software UART
{do
{
char X
while(!DataRdyUSART()); //Checks for data in Hardware USART
x=ReadUSART();
WriteUART(x); // Outputs the data read from the Hardwrae USART
}
while(1);
}

I will be grateful if anyone can send me a sample code or advice on how I can go about this.
Thank you very much.

101
 

lezlit

Joined Jul 25, 2008
2

Attachments

Top