EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Debugging of 9-bit mode

Started by arslan April 16, 2008
I am working on a master slave architecture based on RS485 protocol in
9-bit mode (with backbone configuration).
The master is 80c196kd and the slaves are all 8051 microcontrollers.
The slaves are in fact sensors and actuators.
Now the problem in working with 9-bit mode is that the debgging becomes
tough, normaly i use MATLAB for observing the data (when in 8-bit mode).
Matlab does not support reception of 9-bit mode data.
How can i use Matlab or My PC to debug my network. 

DEBUGGING: In debugging i want to observe every byte of data that moves on
my network.   


"arslan" <arsl_khalid@yahoo.com> wrote in message
news:ouydneYtvoFgepjVnZ2dnUVZ_ommnZ2d@giganews.com...
> I am working on a master slave architecture based on RS485 protocol in > 9-bit mode (with backbone configuration). > The master is 80c196kd and the slaves are all 8051 microcontrollers. > The slaves are in fact sensors and actuators. > Now the problem in working with 9-bit mode is that the debgging becomes > tough, normaly i use MATLAB for observing the data (when in 8-bit mode). > Matlab does not support reception of 9-bit mode data. > How can i use Matlab or My PC to debug my network. > > DEBUGGING: In debugging i want to observe every byte of data that moves on > my network.
Why not use a 8051 to read the data on the net using 9 bit mode and retransmit it on a second UART or even a software UART in 8 bit mode to your PC? You can create special markers to indicate the set 9th bit. Meindert

arslan wrote:

> I am working on a master slave architecture based on RS485 protocol in > 9-bit mode (with backbone configuration).
Bad idea.
> The master is 80c196kd and the slaves are all 8051 microcontrollers. > The slaves are in fact sensors and actuators. > Now the problem in working with 9-bit mode is that the debgging becomes > tough,
For exactly this reason you should never use the 9-bit UART modes. Stick with 8-n-1 for compatibility with everything. It is even better if the protocol is all in HEX and printable characters.
> normaly i use MATLAB for observing the data (when in 8-bit mode). > Matlab does not support reception of 9-bit mode data. > How can i use Matlab or My PC to debug my network.
Using Matlab to debug RS-485 network is like using a Space Shuttle to transport a crap. VLV
On Apr 16, 7:50 am, "arslan" <arsl_kha...@yahoo.com> wrote:

> Now the problem in working with 9-bit mode is that the debgging becomes > tough, normaly i use MATLAB for observing the data (when in 8-bit mode). > Matlab does not support reception of 9-bit mode data. > How can i use Matlab or My PC to debug my network.
First off, don't use Matlab to observe the data unless you are using Matlab to present it in a way that wouldn't be trivial to do with something else - ie, if you are say taking and FFT and plotting that it might be worth the trouble, but if you are just dumping tables of values to the screen use something else. Now, a way to do it: Matlab will interface to external DLL's. It's a bit of a pain to get it working, but it is doable. Write yourself a serial port interface DLL that gets the data and puts it in a format Matlab can deal with. Have your Matlab stuff call the appropriate functions in your DLL.
Vladimir Vassilevsky wrote:
> > > arslan wrote: > >> I am working on a master slave architecture based on RS485 protocol in >> 9-bit mode (with backbone configuration). > > Bad idea. > >> The master is 80c196kd and the slaves are all 8051 microcontrollers. >> The slaves are in fact sensors and actuators. >> Now the problem in working with 9-bit mode is that the debgging becomes >> tough, > > For exactly this reason you should never use the 9-bit UART modes. Stick > with 8-n-1 for compatibility with everything. It is even better if the > protocol is all in HEX and printable characters. >
the 9 bit protocol for 8051 is not 8 + parity. The extra bit is supposed to be a control bit for command / data.
>> normaly i use MATLAB for observing the data (when in 8-bit mode). >> Matlab does not support reception of 9-bit mode data. >> How can i use Matlab or My PC to debug my network. > > Using Matlab to debug RS-485 network is like using a Space Shuttle to > transport a crap. > > VLV > >
On Apr 17, 2:52 am, Neil <NeilKu...@worldnet.att.net> wrote:

> > For exactly this reason you should never use the 9-bit UART modes. Stick > > with 8-n-1 for compatibility with everything. It is even better if the > > protocol is all in HEX and printable characters. > > the 9 bit protocol for 8051 is not 8 + parity. The extra bit is > supposed to be a control bit for command / data.
It was not implied that it was for parity. What was stated was the experienced opinion that a non-standard word length is probably not worth the trouble, compared to other methods of framing. The exception might be if you are right against the limit of what can be done with a baud rate that you can't increase.
cs_posting@hotmail.com wrote:
> On Apr 17, 2:52 am, Neil <NeilKu...@worldnet.att.net> wrote: > >>> For exactly this reason you should never use the 9-bit UART modes. Stick >>> with 8-n-1 for compatibility with everything. It is even better if the >>> protocol is all in HEX and printable characters. >> the 9 bit protocol for 8051 is not 8 + parity. The extra bit is >> supposed to be a control bit for command / data. > > It was not implied that it was for parity. What was stated was the > experienced > opinion that a non-standard word length is probably not worth the > trouble, compared > to other methods of framing. > > The exception might be if you are right against the limit of what can > be done with > a baud rate that you can't increase.
Maybe it was a better idea back in 1980 when everyone did not have a serial port on thier PC. And the chip was an 8Mhz 12 clocker. I never used it so I can't say.
>cs_posting@hotmail.com wrote: >> On Apr 17, 2:52 am, Neil <NeilKu...@worldnet.att.net> wrote: >> >>>> For exactly this reason you should never use the 9-bit UART modes.
Stick
>>>> with 8-n-1 for compatibility with everything. It is even better if
the
>>>> protocol is all in HEX and printable characters. >>> the 9 bit protocol for 8051 is not 8 + parity. The extra bit
is
>>> supposed to be a control bit for command / data. >> >> It was not implied that it was for parity. What was stated was the >> experienced >> opinion that a non-standard word length is probably not worth the >> trouble, compared >> to other methods of framing. >> >> The exception might be if you are right against the limit of what can >> be done with >> a baud rate that you can't increase. > >Maybe it was a better idea back in 1980 when everyone did not have a >serial port on thier PC. And the chip was an 8Mhz 12 clocker. > I never used it so I can't say. >
The main idea behind the 9-bit mode was multiprocessor communication and other methods of framming make communication less efficient or in some cases impossible. I was using Matlab to perform algorithms on the data. thanks for all your advice
>>cs_posting@hotmail.com wrote: >>> On Apr 17, 2:52 am, Neil <NeilKu...@worldnet.att.net> wrote: >>> >>>>> For exactly this reason you should never use the 9-bit UART modes. >Stick >>>>> with 8-n-1 for compatibility with everything. It is even better if >the >>>>> protocol is all in HEX and printable characters. >>>> the 9 bit protocol for 8051 is not 8 + parity. The extra
bit
>is >>>> supposed to be a control bit for command / data. >>> >>> It was not implied that it was for parity. What was stated was the >>> experienced >>> opinion that a non-standard word length is probably not worth the >>> trouble, compared >>> to other methods of framing. >>> >>> The exception might be if you are right against the limit of what can >>> be done with >>> a baud rate that you can't increase. >> >>Maybe it was a better idea back in 1980 when everyone did not have a >>serial port on thier PC. And the chip was an 8Mhz 12 clocker. >> I never used it so I can't say. >> > > >The main idea behind the 9-bit mode was multiprocessor communication and >other methods of framming make communication less efficient or in some >cases impossible. >I was using Matlab to perform algorithms on the data. >thanks for all your advice >
I have used matlab to observe the data, strange as it may sound Matlab works just fine

Memfault Beyond the Launch