Jump to content

9 data bits?


atk_nut

Recommended Posts

I have an older obscure peice of hardware that has a serial protocol with 9 data bits. The protocol is as follows:

Baud: 4800

1 start bit + 9 data bits (described below) + 1 stop bit

No parity bits

Byte 1 - channel id: 1nnnnnnnn

Byte 2 - channel level: 0xxxxxxxx

I've tried faking it out in various ways using Mark and space parity, but it doesn't work.

Has anyone out there done this before?

Thanks.

Link to comment
I have an older obscure peice of hardware that has a serial protocol with 9 data bits.  The protocol is as follows:

Baud: 4800

1 start bit + 9 data bits (described below) + 1 stop bit

No parity bits

Byte 1 - channel id: 1nnnnnnnn

Byte 2 - channel level: 0xxxxxxxx

I've tried faking it out in various ways using Mark and space parity, but it doesn't work.

Has anyone out there done this before?

Thanks.

4966[/snapback]

I haven't found any USART in a PC that supports 9 data bits, but I implemented a serial interface using one of the bits in the parallel port and then doing the framing and synchronization in software. If you need bi-directional communication, then you will need to use two bits and write a transmission driver as well.

You can access the parallel port using the Port I/O primitives in the Advanced Palette.

A few things to watch out for:

-Depending on the PC, the parallel port can be found at one of two base addresses. One is "standard" and the second, less frequent is often used in laptops.

-The chipset controlling the port most often emulates the original chip, an 8255. It is programmable so you may need to access various registers at Base+0, Base+1 and so on, to change the modes available.

- You will need to give the serial routines a high priority because there will be no hardware buffering. If the routine isn't running, you will miss data. I used a subroutine priority for a small part of the code which just look for state changes and then buffered the data.

Sorry I don't have any specifics right at hand but connector pin-outs and register information is easily found on the 'net.

It helps if you have some hardware and register-level programming experience, but it's not as tough as it may sound. I was pleasantly surprised when I found out how fast the final product was (~120Kbps), even though it was implemented in S/W, so 4800 Baud should be a piece of cake, particularly on a contemporary machine.

This should give you a head start if you chose to take this path.

Good luck!

Barrie

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.