Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051s 9th bit and Visual Basic 6

Not open for further replies.


Junior Member level 3
Sep 17, 2002
Reaction score
Trophy points
Activity points
8051's 9th bit and VB

Ok, here's the thing:

Im making this project...which envolves 3 AT89C52... 1 is the Master the other 2 are slaves.... all the embedded stuff is done including 4 DS1620 as temperature sensonrs, 1 keypad and 1 LCD....

My problem started with the interface with the computer... im making the application on Visual Basic 6 (the app that will run on the computer)

My "MAIN" problem starts with the master/slave configuration... seeing as in master/slave you use 9 bits for the serial transter... as in:

when the master tries to indentify a slave.. it sends the adress of that slave with the 9th bit SET... after that... the slave turns off his SM2 bit and that makes him a slave will revice data with the 9th bit CLEARed... the other slaves wont be affected cause they still have their SM2 SET (this makes him a slave)...ok back to the problem..

i set the serial comm configuration on my VB app to be at 9 bits.. but.. since the computer doesnt have an SM2... how do i make it a slave??

it will always listen to all the stuff i send to it, regardless of the nith bit...

how did you guys attacked this problem? can one read bit by bit on VB?
where does the 9th bit go???

i think you guys get what my problem is... and i hope you can help out...

best regards and i await your answer.... :? :oops: :(

The 9th bit if I recall correctly is in the same space as parity. I guess you can set your protocol to PC to be 8 bit, even parity, then do a lot of bit bashing in VB whilst looking for parity error which, in your case is not really an error. etc etc.

Happy hacking.



You don't recall quite correctly. The 9th bit is in the same space as parity, but identifies an address byte - it is not a Parity bit! Read the MCS51 manual. It's true that you can move the parity bit from PSW into TB8 when sending, but it's not usual behaviour when using multiprocessor comunication feature on 8052 micro.

What goosiegoo is trying to do is enable the PC to receive characters with 11 bits on a PC, 1 start, 8 data, 1 (address - data flag, call it parity if you want), and 1 stop bit.

See also my reply on same topic post by goosiegoo into:

**broken link removed**

Not open for further replies.

Part and Inventory Search

Welcome to