The 18F2520, according to page 343 of the datasheet (DS39631B) indicates that at exactly 25C the error is up to +/- 2%, and it goes from bad to worse at +/- 10% with the industrial part from -40C to 85C. It also says that the typical error in all these ranges is +/- 1%. Previously I had decided that I would allow up to 2% off in my one-off designs, which, if communicating with another of my designs together might be miscommunicating by nearly 4%, which is still ok since center sampling the rs-232 signal would give good results with up to 4% off for the stop bit. Since the RS-232 byte is 10 bits (start, 8 data, 1 stop) long then a 10% difference would mean that the end of the stop bit would be exactly 1 bit off in timing. This would be complete failure. 5% _might_ go through depending on the direction of the error and methods for sampling the data stream. 2% would usually go through - but isn't guaranteed. So - the spec says that you can only get +/- 2% guaranteed at 25C with no temperature variation. Good luck with that! You should get out the scope and time it to check, but yes, your problem could in fact be due to poor RC oscillator characteristics. If you have a stable source to listen to, you can self calibrate the RS-232 bit rate. For instance, if the other side of the line sent you a byte occasionally you can bit bang receive it and time it so you can send back at the same frequency. -Adam On 6/11/07, alan smith wrote: > There havae been past discussion by me and others about using the internal RC osc for a buad clock. I do have a 4mhz resonator but I pulled it off thinking I could use the internal clock but... > > Seems that data is not transmitting correclty...dropping characters, or wrong characters. I havent looked at it with the scope yet, just wondering if there is some initial issue with using the internal clock. I have a pattern just looping to transmit and thats what I'm watching. From what I can see, the TXREG always holds the correct data. Scope is next...see what the timing actually looks like. Is the code correct? I'd say yes, only since it is transmitting something and sending out the uart isnt that difficult. > > > > > --------------------------------- > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Moving in southeast Michigan? Buy my house: http://ubasics.com/house/ Interested in electronics? Check out the projects at http://ubasics.com Building your own house? Check out http://ubasics.com/home/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist