
Originally Posted by
mikebar
Thank you Dave.
Actually the 9th bit it is really NOT a parity bit, for that protocol. Is is used as a flag in different moments.
What I'm trying to do is a Master (that in the MDB documentation is called V.M.C., that means Vending Machine Controller).
So, a Master has to send a "message" to a "slave" indicating, in the first byte, the address and then the serial message has to continue sending eventually any "DATA".
So, the schema should be:
- send the slave's address with the 9th bit set
- eventually start sending data with the 9th bit cleared.
When the slave answer, then the 9th bit assume another meaning at the VMC side: it has to be cleared while the answer's bytes are sent from the slave and then on the LAST byte it has to be set. This will help the VMC understand the transmission is finished.
So, the questions are:
- should I manipulate the TX9D register BEFORE use some HSEROUT?
- If I'll write to the TX9D register despite the "Define HSER_EVEN 1", will the HSEROUT command use the content of the TX9D register in the way I wish?
- when I'll go to receive some message, will HSERIN load the content of the RX9D register in the proper way?
...or just I can't use any HSERIN/HSEROUT for that purposes?
I'm sorry for that questions that looks silly, but it is the first attempt to that world and I'm trying to find some help that put a light over a more than 350 pages of documentation about that MDB protocol...
Thank you for your help.
Bookmarks