??? 02/16/06 19:33 Read: times |
#110181 - You're right, but what that means is ... Responding to: ???'s previous message |
The serial port on the 805x is NOT just a UART. Your analogy to the 74595/74597 (double-buffered) devices is sound where Mode 0 is concerned. It does transmit and receive over the same pin, but there are cases in which that is quite useful.
I'm of the belief that the Mode-0 is unpopular because, until the advent of the four-clockers and one-clockers, it was pretty difficult to exploit. Since it transmits one bit for every twelve oscillator cycles, it transmits one bit for every instruction cycle, and many instructions require two or three of these. If you have only eight instruction cycles per byte, you don't have much time to do anything with the data. That limits its usefulness, particularly if it's supposed to be in an ISR. Now, however, we have the opportunity to use mode 0 to receive or transmit sampled serial data and the associate clock as part of an ISR or any other sort of routine. The MCU transmits the shift clock and either receives or transmits data in synchronization with that clock, but the MCU executes an instruction in up to three oscillator cycles, so there's plenty of time to manupulate the data between interrupts. It seems to me that there's plenty of opportunity to exploit this. It just requires a bit of thought. Any closely-coupled synchronous communication application will put tight restrictions on the crystal frequency that can be used, though. IIRC, I quoted you, at one time, as saying that any conventional asynchronous baud clock for 4800 baud and higher could be derived from 12 MHz by using timer 2. Is that no longer the case? RE |