> Sometimes we need to exchange data between two MCUs through opto > coupler (or magnetic coupler from Analog Device). If both side have SPI or > I2C or UART, then we will normally use these resources. However we may > not have these features (or they have better things to do), then we might > think of using two port pins for serial communication(software UART). > > Here is once question, if we need relative high speed, say to transmit > 8 bytes of data (64bits) continuously per 1ms (>=64kbps). We might also > need to use certain encoding method so that it is more immune to noise. Is > this easily doable with small MCUs like small PIC16Fs running the internal > RC oscillator of 8MHz or 4-clock-per-instruction 8051s running at 20MHz > crystal? Is it easily doable with an MSP430 with internal calibrated 16Mhz > oscillator (single clock per instruction but clock tolerance is +/-5% over > all temperature)? Will this kind of serial communication make the MCU > fully occupied? > > Regards, > Xiaofan There are several approaches to this. As others have mentioned RC oscillators are not usually stable enough for async serial, but there are plenty of clocked protocols that are workable with RC oscillators. But here's the problem - an 8Mhz PIC is chugging along at 2 MIPS. 2 million/64k leaves about 31 instructions per bit time. Probably not enough to do anything else useful. Find a way to reduce your data needs or get a bigger proccessor. -Denny -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist