04-17-2003 01:56 PM
04-17-2003 02:17 PM
04-17-2003 03:15 PM
07-29-2010 02:58 PM
I have the same problem: I want to send binary data over the RS232. Unluckily the suggested solution doesnt work for me since the communication protocol that is implemented on the target hardware expects a 9bit wide command. The 9bit command cannot be converted to an ascii character. Is there a way i can still make use of the VISA functions to transmit 9bit command instructions over serial protocol at 19200 baud, 1 stop bit and odd parity check?
Thanks for any suggestion.
07-29-2010 03:07 PM
I have to run but try seraching " 9 bit" on this site and chasing the links.
This has been discussed before (mat Fitzimons?) and takes advantage fo using tow stop bits and lying about the parity.
It here somehwere.
Ben
07-29-2010 03:59 PM
What I want to know is what kind of idiot engineer designed a system to use a 9-bit command using a protocol designed for 7 or 8 bit data? Duuuhhhh....
07-29-2010 04:23 PM
Hi I found a thread in the knowledge base that addresses the 9 bit protocols, there is even an example that can be downloaded:
http://digital.ni.com/public.nsf/allkb/3bdc7ff03541f772862564990057f919
http://sine.ni.com/devzone/cda/epd/p/id/850
However, I am not sure if this solves my problem, since the protocol on my target hardware makes use of the odd parity bit. Does the Mark or Space parity bit add another 10th bit to the command or can i only use either ODD parity/Mark/Space?
@tbob: I probably shouldnt tell my customer that he's an idiot, and obviously 9 bit addressing/signalling modes seem to be not so uncommon in industry, so ur post does not really contribute to solve the problem.
07-29-2010 04:48 PM
@r_keller wrote:
@tbob: I probably shouldnt tell my customer that he's an idiot, and obviously 9 bit addressing/signalling modes seem to be not so uncommon in industry, so ur post does not really contribute to solve the problem.
Well I wouldn't call my customer an idiot either. I didn't know he was your customer. Sorry. Not every comment posted here is intended to directly solve a problem. We are a fun loving group, and occasional ribbings take place here. I still think that trying to use 9 bits over an 8-bit protocol is not a good way to go. But if it is the only way, then so be it.
@r_keller wrote:
Does the Mark or Space parity bit add another 10th bit to the command or can i only use either ODD parity/Mark/Space?
According to the link you attached, the parity bit adds only one more bit. If the number of bits is set to 8, then the parity is the 9th bit, and you can only use Mark or Space to force that 9th bit to either 1 or 0 respectively. If you try to use odd or even parity, the protocol will determine the parity and change the bit accordingly, and it may not be the one you intended to send. The start and stop bits are fixed by the protocol and cannot be used for extra data bits.
Actually, until I read that article about using Mark and Space, I had no idea at all that sending 9 bits at a time was possible.
07-29-2010 04:55 PM
@tbob wrote:
What I want to know is what kind of idiot engineer designed a system to use a 9-bit command using a protocol designed for 7 or 8 bit data? Duuuhhhh....
The same one who designed I2C with 7-bit addressing and then discovered, that oh, wait, we need 10-bit addressing.
07-29-2010 05:15 PM
@smercurio_fc wrote:
@tbob wrote:
What I want to know is what kind of idiot engineer designed a system to use a 9-bit command using a protocol designed for 7 or 8 bit data? Duuuhhhh....
The same one who designed I2C with 7-bit addressing and then discovered, that oh, wait, we need 10-bit addressing.
Yeah, I've had to deal with that issue too. I had to write new code to handle 10 bit addressing. Why can't they just standardize on one and dissolve the other?
If you think that is something, you should see the different flavors of SPI. Each designer has to throw in his own little quirk, 4-wrie SPI, 3-wire SPI, 5 bit address, 6 bit address, 7 bit address, etc...