ON 20071002@3:16:05 PM at page: http://www.piclist.com/member/RMO-yahoo-981/index.htm#39356.8292939815 James Newton[JMN-EFP-786] Published and replied to post 39356.8292939815 by rf_orcullo |Insert 'The internal clock is VERY inaccurate. For RS232, use a crystal or plan on constantly adjusting the registers to dial in the transmission speed.' at: '' rf_orcullo@yahoo.com asks:
hi!

i am a newbie of pic usart programming. i use pic16f627 and all trisb and trisa are used as i/o. since all pins are used as digital i/o so i have to use the internal clock 4mhz on my pic by setting the configuration word. my baudrate is 4800 set in spbrg and i also use the high speed. at first, my tx/rx can send and receive the right data as i have expected. but later on, as i continued to make a progress of my code and make several hex download to the pic, the data sent and received is not the right ones anymore. luckily, i have a spare code that im sure that works, but then when i program the hex to the pic, the same wrong data is sent/received. i checked the max232 and even replaced a new one, bt it was just ok. by checking the sent/received data through oscilloscope, i have found that the data sent/received had changed. if the data before was logic1 within 0.2ms, now it reads longer that 0.2ms. the time has changed. so i tried to change the spbrg to another baudrate to check. this time, i got the right data. my problem now is that i use this specific baudrate on my pic, and another baudrate on my pc hyperterminal. what was wrong? i used the same baudrate to my pc and pic before. bt now, what had happened? i am just worried that maybe later, on a project checking, wrong data will be sent/received. how can i fix this? i want to use 4800 baudrate for my pc's hyperterminal and pic.

your response is very much appreciated. thank you
|Delete 'P-' before: '' but after: 'rf_orcullo@yahoo.com asks:
Thank you Mr. James Newton.

But, what do you mean by constantly adjusting the registers to dial in the transmission speed? How to do that? Can you explain it to me using examples? I really have to use internal clock since all ports are used in digital I/O.

Thank you so much for the immediate response.
|Delete 'P-' before: '' but after: '