Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/16/04 14:26
Read: times


 
#68623 - RE: non-standard baud rate
Responding to: ???'s previous message
hi,
well, I have read all suggestions above.
Hmm, you know, I can explain you how to communicate devices with different baud rates via UART/COM. And it is not need with additional hardware moreover than MAX232 (this chip is required anyway to convert levels between PC and MCU).

So,
1) install MAX232 (or similar chip) between PC COM and MCU UART.
2) prepare yourself that you will not be able to obtain true 93750 baud rate. If you need to communicate anyway notwithstanding on the slow speed then it is possible, yeah!
3) prepare yourself that it requires extra framework with programming both PC and MCU as well.
4) Be ready, I start! (=

Well, now look at the figure below which shows bit stream process:


As you can see, I select 57600 as the speed of PC COM.
Now the idea: due transaction you send/receive not 8 data bits but only 2. Oh, it decreases speed but still keep such communication available.

For example, PC sends byte to the MCU. It splits byte into 4 blocks each one is 2-bits wide. It sends then byte 11111b1a where a and b are two bits of a block. As result these bits come out from COM as:
0(start)-a-1-b-1-1-1-1-1-1(stop). MCU detects start bit and reads 8 data bits. From figure above you may see that it receives something like:
0(start)-x-a-x-x-b-x-1-1-1(stop) where x is undefined value. It results as byte 11xbxxax placed into UART due reception. Now we just extract bits 1 and 4 and go to wait for the next block of two bits.

And vice versa now: MCU sends byte to the PC. As same as PC, MCU splits byte into 4 blocks each one is 2-bits wide. It sends then byte bbb1aa10 which come out from UART as:
0(start)-0(keep start)-1-a-a-1-b-b-b-1(stop). Important: due UART is faster than COM so MCU should wait additional time before start to send next block.
PC detects start bit and reads 8 data bits. From figure above you may see that it receives something like:
0(start)-x-a-x-b-x-1-1-1-1(stop). It results as byte
111xbxax placed into FIFO of COM port. Now we just extract bits 1 and 3 and go to wait for the next block of two bits.

Please check before do because I wrote it fast and there are may be some mistakes but I hope you catch the idea!

Regards,
Oleg

List of 20 messages in thread
TopicAuthorDate
non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
      RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
      RE: non-standard baud rate            01/01/70 00:00      
      RE: non-standard baud rate            01/01/70 00:00      
         RE: non-standard baud rate            01/01/70 00:00      
            RE: non-standard baud rate            01/01/70 00:00      
               RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
      RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
      RE: non-standard baud rate            01/01/70 00:00      
   RE: non-standard baud rate            01/01/70 00:00      
      non-standard baud rate - no problem            01/01/70 00:00      

Back to Subject List