Can anyone help- UART Commn

Status
Not open for further replies.

rameshelectro

New Member
I used microC for pgmming 18f4520. the pgm aim is to transmit the same data back to terminal.But what i get is different.
send data:hi dere
received data:ø8øø
Code goes here:

void main() {

unsigned char Temp;
trisb=0x00;
Uart1_Init(9600);
Delay_ms(25);
latb.b1=1;
Delay_ms(50);
UART1_Write_Text("Start");
UART1_Write_Text(" ");
latb.b1=0;
for(;; )
{
while (!UART1_Data_Ready());
Temp = UART1_Read();
latb.b1 = ~latb.b1;
Delay_ms(50);
UART1_Write(Temp);
latb.b1 = ~latb.b1;
Delay_ms(50);

}
 
check whether the internal oscillator is calibrated correctly... the config bits of pic 18f series are a bit confusing. Double check the config bits.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…