Maarten Hofman wrote: >> USART is great, great when you have time for do something else than the >> real >> thing. But the whole thing depends on timing, number of instructions etc >> which is not very nice I know -- sometimes modifing only one instruction >> takes as long as an hour. But that's my problem, I wanted to put it into >> the >> smallest PIC :-) -- 10F2xx, no interrupts, only 1 8bit timer without >> knowing >> that is overflowed etc. >> > > > I would be a bit scared doing a serial interface on a PIC using its internal > oscillator. In the past I've had issues of drift (not sure where the drift > came from, but i guess it could be temperature or just the phase of the > moon) where I had to readjust the speed of USART to compensate for a change > in the oscillator frequency. Of course, you can calibrate the 10F200, and > its oscillator might be more accurate than the one in the 16F628A and the > 16F688, so it might be less of an issue. Also, you are coding it yourself, > so your base accuracy could be higher. > > Greetings, > Maarten Hofman. > I experimented with the PIC12C672 timer for UART purposes. What I found was that the timer was faster at first then slowed down, on a cycle that seemed to be about f/20. What that meant was that at 19.2kb it wasn't useable, but at 1200 it worked OK, because the cycle was smoothed out. But there is a better way to do it; use Manchester coding, which is not dependent on precise timing. I can send and receive this type of transmission at 2x or 1/2x of the intended speed and I have no problem reading the data. I now use this for all non-UART serial schemes. --Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist