| Author |
Message |
Ghassan Al-Mutawa
Joined: 09 Oct 2005 Posts: 24 Location: Bahrain
|
04 Oct 2006 12:22 A Problem In Interfacin A uController To The Visual Basic |
|
|
|
|
i am asking for help in a simple problem that makes me mad, i am doing a home project to write to a microcontroller using a visual basic program then the microcontroller check some thing and send an eight bit signal to the visual basic program. the real problem is that when the microcontroller send the signal of 8 bits to the computer i have to do the reading 3 times so i can see some thing appearing, and appear as unicoded char ( arabic charecters ). what i really think is that the 8 bits i am sending goes to the uart buffer which is 32 bit wide and goes to the top most of the buffer, i need a hand shaking to get the job done in an apropriate way.
The big question is what are the pins i need to solve this problem ? are they CTS / RTS or i need more than that ?
If you can show me the way or tell me what to do i will be thankfull.
waiting for your reply i am in a bad mood because of this thing.
|
|
| Back to top |
|
 |
artem
Joined: 22 May 2003 Posts: 1652 Helped: 91 Location: Turan
|
04 Oct 2006 14:05 A Problem In Interfacin A uController To The Visual Basic |
|
|
|
|
in c by configuring communication structures of windows structure you can disable handshaking and hardware and software flow control. I guess these are in dcb structure . Have a look to microshop page :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp
DCB structure should be accessible from basic as well
|
|
| Back to top |
|
 |
Google AdSense

|
04 Oct 2006 14:05 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
Ghassan Al-Mutawa
Joined: 09 Oct 2005 Posts: 24 Location: Bahrain
|
04 Oct 2006 17:31 A Problem In Interfacin A uController To The Visual Basic |
|
|
|
|
well i have just read the artical you sent me in the msdn library, the problem is that i am usig visual basic 6 not the c commands, is there any thing better to show me what i want ? plz
i never saw a command DCB in visual basic too
|
|
| Back to top |
|
 |
Bus Master
Joined: 09 Dec 2001 Posts: 209 Helped: 6 Location: Just behind You ;-)
|
04 Oct 2006 18:37 Re: A Problem In Interfacin A uController To The Visual Basi |
|
|
|
|
In VB6, i use MSCOMM control to communicate through RS232 port. You seem to have something wrong with the communication algorithm between your uC and PC. You may use a (Header byte) to start every single communication packet and use a fixed no. of bytes per packet. Also, it's good to add some packet checksum byte to be sure data is received correctly.
All of this can be done in the mode of No-Control signals (Only Tx, Rx & GND) signals required for successfull communication.
Contact me if u need any help.
|
|
| Back to top |
|
 |
Ghassan Al-Mutawa
Joined: 09 Oct 2005 Posts: 24 Location: Bahrain
|
|
| Back to top |
|
 |