| Author |
Message |
McMurry
Joined: 16 Feb 2008 Posts: 75
|
03 Jun 2008 11:15 gpio control in vb6 |
|
|
|
|
I am currently using Visual Basic 6 and C language for microcontroller.
I want to make a certain GPIO pin on the microcontroller to turn on after a certain condition in Visual Basic is reached (or to make it easier, after a click on a button in GUI)
I only manage to find how to display the data sent to the computer through serial port,
but fail to find any good example that would enable a signal to be sent to the MCU via the RS232 so that one of the GPIO pin would be turned on.
Is there any good tutorial / website that you can recommend?
Thanks in advance .
|
|
| Back to top |
|
 |
Google AdSense

|
03 Jun 2008 11:15 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
mpardinho
Joined: 07 Aug 2006 Posts: 10
|
11 Jun 2008 20:06 Re: Using Visual Basic to on/off the mcu GPIO |
|
|
|
|
i use vb6,
you need send one or more caracters to mcu(pic/atmel)?
example:
click button1 send X
click button2 send Y
if do you have i post code?
|
|
| Back to top |
|
 |
pcup
Joined: 26 Dec 2007 Posts: 92 Helped: 14 Location: India
|
12 Jun 2008 0:31 Re: Using Visual Basic to on/off the mcu GPIO |
|
|
|
|
When you displayed data means you are aware of communication control and initialization of control..
This is simple example of sending data to MCU. then data will process over there by your C code.
CommCTL.CommPort = 1
CommCTL.Settings = "2400,n,8,1"
CommCTL.PortOpen = True
CommCTL.InputLen = 1
Private Sub ComdSend_Click()
CommCTL.Output = Chr$(IOText.Text)
Do While CommCTL.InBufferCount < 1
Loop
CommCTL.PortOpen = False
End Sub
|
|
| Back to top |
|
 |