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
  • "I'm using the ComPort component in BCB from Dejan Crnila,"

    Yes, that's the one I mentioned above.
    As I said, from the description in the Help file, in sounds like it's no good.

    "it includes the full source code."

    Yes, the source code is included, but it's not documented! :-(

    A quick look at CPort.pas shows that it relies upon the Win32 API - using CreateFile, etc
    Therefore it is doomed - the problems mentioned are inherent in the Win32 API. :-(

Reply
  • "I'm using the ComPort component in BCB from Dejan Crnila,"

    Yes, that's the one I mentioned above.
    As I said, from the description in the Help file, in sounds like it's no good.

    "it includes the full source code."

    Yes, the source code is included, but it's not documented! :-(

    A quick look at CPort.pas shows that it relies upon the Win32 API - using CreateFile, etc
    Therefore it is doomed - the problems mentioned are inherent in the Win32 API. :-(

Children
  • With multiprocessor serial bus configuration of 8052, I understand that one-to-many communication is possible (like a tree).

      Master <--+------> Slave 1
                |
                +------> Slave 2
                    :     :
                +------> Slave N
    

    It is impossible to make a many-to-many communication with this mechanism, right?

  • "It is impossible to make a many-to-many communication with this mechanism" (my emphasis)

    Yes, that's right, because there is no way to stop multiple devices writing to the bus at the same time & corrupting each other's data;
    By have 1 Master and many slaves, the Master ensures that only 1 slave may transmit at a time, and collisions are avoided.