??? 03/29/09 19:10 Read: times |
#163973 - Independent UARTs Responding to: ???'s previous message |
Kai Klaas said:
If you have a look at his calculator
![]() you will see that he already uses Timer 1 (TL1) and Timer 2 (RCAP2L) for his job. The baud rate formulas show that every crystal frequency that is a common multiple of 6MHz and 8MHz will work. The lowest common multiple is 24MHz. Or do you mean that Chico will need two independent UARTs with independent control bytes? This would also solve his 9th bit problem, right? Kai Yes, that's what I meant. 8052 should be able to handle this, don't you think? I'm not persuaded that his calculator provides the information that he needs. He does need to settle on a single crystal timebase that will enable him to compute "close-enough" values for both baud rate generators, if he doesn't decide simply to use an external UART/BRG, but it should be possible to get there with a single crystal timebase. His use of 40 MHz may limit his choice of MCU, too. The ratio of the two baud rates it 8:1, so I'd guess the same timebase would definitely do it. It seems that one should be able to establish the 8:1 ratio using an arbitrary crystal, then multiply the arbitrary crystal by the ratio of the resulting lower baud rate to 31.25KHz. This would demand the use of both timers, I suppose, which would be acceptable if he didn't need them for something else. Now, I'm not a frequent user of 805x UARTs, since I seldom have to use ASYNC comm's. Perhaps someone else can shed more light on the matter. RE |