This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PC link to 8051 Mode 2/3: Multiprocessor Serial Bus

Cross-posting from the 8052.com forum http://www.8052.com/forum/index.phtml

A while back (http://www.8052.com/forum/read.phtml?id=23083), I asked about how to get a PC to read the 9th bit in Mode 2/3: Multiprocessor Serial bus format.

I need to be able to detect the state of the 9th bit for each received byte.

Mahmood Elnasser suggested the cport library: http://www2.arnes.si/~sopecrni/downloads/CPort263.zip

I've downloaded this, and it doesn't look like it'll do the job :-(
(It looks like it'll have the same problem as AsyncPro)

The OnRxChar Event could return any number of characters, but the LastErrors Method - as its name suggests - only tells me what the last error was; ie, I can't tell which of the received bytes had the 9th bit set (Parity error).

Any help would be greatly appreciated.

I'm currently looking around at direct IO drivers for Windows

(yes, I know it'd be a doddle in MS-DOS).

Parents
  • If you are trying to read the 9th bit on a PC, I think you are going to be out of luck. The PC uses a 16450 or 16550 UART. Here are the specs for it:

    16450 & 16550 UART Features:
    
    Hardware and software register compatible with all standard 16450 UARTs 
    Implements all standard serial interface protocols 
    5, 6, 7 or 8 bits per character 
    Odd, Even or no parity detection and generation 
    1, 1.5 or 2 stop bit detection and generation 
    Internal baud rate generator and separate receiver clock input 
    Modem control functions 
    False start bit detection and recovery 
    Prioritized transmit, receive, line status and modem control interrupts 
    Line break detection and generation 
    Internal loop back diagnostic functionality 
    Independent 16 word transmit and receive FIFOs (16550 Only) 
    

    Note that only 5, 6, 7, or 8 bits can be received. You may want to check the datasheet, but I pretty certain that is correct.

    If you need to get that kind of data into a PC, you'll either need to find another solution than the PC's COM ports. Two suggestions I have are: 1) find a PC plug-in card with an 8051 on it, or 2) create a USB-8051 interface card.

    Jon

Reply
  • If you are trying to read the 9th bit on a PC, I think you are going to be out of luck. The PC uses a 16450 or 16550 UART. Here are the specs for it:

    16450 & 16550 UART Features:
    
    Hardware and software register compatible with all standard 16450 UARTs 
    Implements all standard serial interface protocols 
    5, 6, 7 or 8 bits per character 
    Odd, Even or no parity detection and generation 
    1, 1.5 or 2 stop bit detection and generation 
    Internal baud rate generator and separate receiver clock input 
    Modem control functions 
    False start bit detection and recovery 
    Prioritized transmit, receive, line status and modem control interrupts 
    Line break detection and generation 
    Internal loop back diagnostic functionality 
    Independent 16 word transmit and receive FIFOs (16550 Only) 
    

    Note that only 5, 6, 7, or 8 bits can be received. You may want to check the datasheet, but I pretty certain that is correct.

    If you need to get that kind of data into a PC, you'll either need to find another solution than the PC's COM ports. Two suggestions I have are: 1) find a PC plug-in card with an 8051 on it, or 2) create a USB-8051 interface card.

    Jon

Children