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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/03/04 12:17
Read: times


 
#61830 - 7-bit serial reception
This has been discussed before http://www.8052.com/forum/read.phtml?id=15898
http://www.8052.com/forum/read.phtml?id=53773

the suggestions for the implementation have been software UART and the "8-bit serial ignoring the last bit" formula.

I am interested in interfacing a serial microsoft mouse to the p89c51rd2. The serial communication specs for this family of mice is

Baud rate: 1200
Bits: 7
No parity
One stop bit.

The data is sent in a three 7-bit wide packet. what i mean is d1 d2 d3 where d1,d2,d3 are 7-bit wide.

I have been testing this with the onboard UART16550 (or compatible) of my desktop PC. Nodoubt my worries are solved with the data field size being set at 7-bits, but since the UART on board the microcontroller cannot handle 7-bit wide data fields, i was trying to improvise on the "8-bit serial ignoring the last bit" formula, which turns out to be a spectacular disaster in this case. the failure can be attributed to the stop bit which is taken as the last bit and the lack of gap between successive transmissions.

Well to cut a long story short what i did was increase the baud rate such that the first bit and the last bit are recieved without error. but this scheme means that at least one bit of the seven bits will be sampled twice or worst case senario the sampling will occur during transitions. But then it is possible, at least intutively, to determine the probable location of the error. which i guess is either the 5th bit and/or the 4th bit (8-7-6-5-4-3-2-1).

how can i say this? if i move the mouse sightly to the front then the displacement cause the mouse to output serially 1001100 0000000 0111111 which corresponds to -1 in y dir. this is both the expected value and the obsereved value with the 7-bit wide data format. with the 8-bit data wide format i get 10011100 00000000 01111111. a 1000100 or 1001000 input might solve the mystery.

do you advice going ahead with this train of thought and action or should i stick to the more sober external UART or the software UART?

cheers,

sushil

List of 9 messages in thread
TopicAuthorDate
7-bit serial reception            01/01/70 00:00      
   Did you want it to work?            01/01/70 00:00      
   Why async?            01/01/70 00:00      
      RE: Why async?            01/01/70 00:00      
         RE: Why async?            01/01/70 00:00      
   RE: 7-bit serial reception            01/01/70 00:00      
      RE: 7-bit serial reception            01/01/70 00:00      
         RE: 7-bit serial reception            01/01/70 00:00      
            RE: 7-bit serial reception            01/01/70 00:00      

Back to Subject List