??? 03/10/08 11:16 Read: times |
#152073 - Use a Timer IRQ to set the soft baudrate Responding to: ???'s previous message |
I would be surprised if you will get a massive difference in cycles on such simple code. Personally I agree that a change of chip or xtal would require the complicated recalculation of the delay.
Using a timer in CTC mode just requires knowledge of the xtal clock. Any execution time differences between compilers would be trivial. A UART receiver samples the bit half way through the bit time. The ISR has to complete within the 52 uS. Not impossible for a 12MHz 12 clock 8051 in any language. Now if the OP did not have his redundant RX pin, that really would make a difficult problem. David. |