| Author |
Message |
glenndr_15
Joined: 27 Mar 2009 Posts: 28 Helped: 1
|
01 Jun 2009 16:44 serial port microcontroller |
|
|
|
|
Greetings how can I interface a microcontroller (for example PIC16F877A) using serial communication? and how to make a VB can someone share?
best regards,
glenndr_15
|
|
| Back to top |
|
 |
sau_sol
Joined: 27 Feb 2008 Posts: 249 Helped: 27 Location: India
|
02 Jun 2009 6:31 how to interface microcontroller with pc |
|
|
|
|
for a serial communication you have to use UART and a voltage converter IC like MAX232 for converting 5 - 0V to +-15V compatible to Serial communication in Computer
And VB directly has an interfacing command with the COM Port But I Dont know much about VB
|
|
| Back to top |
|
 |
glenndr_15
Joined: 27 Mar 2009 Posts: 28 Helped: 1
|
03 Jun 2009 14:48 rs232e cable |
|
|
|
|
| I see but are you putting some program in the microcontroller say a code to communicate to computer?
|
|
| Back to top |
|
 |
sau_sol
Joined: 27 Feb 2008 Posts: 249 Helped: 27 Location: India
|
04 Jun 2009 6:19 interfacing microcontroller to pc |
|
|
|
|
yes this is what the micro controller is.
We write our program according to the hardware and our application and then we put that program in to the controller
and then the controller function according to the code burned into its memory
|
|
| Back to top |
|
 |
aanand_44
Joined: 25 Jul 2007 Posts: 24 Helped: 2 Location: India
|
09 Jun 2009 12:35 win32 api using serial port vb6 |
|
|
|
|
hi,
first which compiler you have to use to develop uart program. please tell me detail i will give you solution for that. in VB it is not much difficult. also i will give you that too.
Regards,
Anand.A
|
|
| Back to top |
|
 |
Google AdSense

|
09 Jun 2009 12:35 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
elrayes
Joined: 03 Jun 2008 Posts: 164 Helped: 8 Location: Egypt
|
09 Jun 2009 13:26 flowcode usart |
|
|
|
|
if you are using C16 or C18 compiler you will find in the libraries guide API's and instructions used to interface microcontroller UART/USART module and example code on it, also you will find functions and example code if you are using MikroC IDE in MikroC manual.
Good luck
Added after 4 minutes:
Forget the PC side programming
you can use Win32 API "CreateFile" to communicate with serial port using MS visual C++ (use header file windows.h) or in visual BASIC, through one of them you will interface your COM port.
Good luck
|
|
| Back to top |
|
 |
craftythejoe
Joined: 10 Jun 2009 Posts: 2 Location: UK
|
12 Jun 2009 1:21 microcontroller to pc |
|
|
|
|
Hi,
If you are wanting to interface your micro with a P.C, i'm working on a project at the moment similar to your topic. I'm using a matrixmultimedia PIC16F877A with a corresponding RS 232 e-block. The P.C software i used is labVIEW for delivering data to the PIC via COM port, RS 232 cable, RS 232 e-block, PIC. I use flowcode to initialise the 232 board and process the received data from the P.C.
RS 232 is a serial data bus protocol.
Labview is a fairly complex software to use however. Also, there can be issues with timing of flowcode sampling rates to labVIEW transmission rates, you just have to play arond with time delays a bit.
If you are wanting to interface with another microcontroller, maybe try using CAN protocol. Fairly easy to program, fast results in little time.
I don't know if this is helpful to you but good luck anyway!
P.S i had quite alot of drama creating a clear interface between my PIC and P.C.
|
|
| Back to top |
|
 |
glenndr_15
Joined: 27 Mar 2009 Posts: 28 Helped: 1
|
12 Jun 2009 2:06 pc interfacing for serial communications using vb |
|
|
|
|
| aanand_44 wrote: |
hi,
first which compiler you have to use to develop uart program. please tell me detail i will give you solution for that. in VB it is not much difficult. also i will give you that too.
Regards,
Anand.A |
For example I'm going to use AT89C4051, from PC I want to control a DC motor that rotates clockwise and counter clockwise. From PC if I press letter "A" the letter "A" will be displayed in the dot matrix or LCD or 7 segment display
Best regards,
glenndr_15
|
|
| Back to top |
|
 |
madicalphy
Joined: 22 Jul 2007 Posts: 68 Helped: 3
|
|
| Back to top |
|
 |
jeswanthmg
Joined: 06 Jun 2009 Posts: 15 Location: Bangalore
|
13 Jun 2009 13:39 microcontroller to pc software |
|
|
|
|
Dude its easy try this files.
I have made it work well but vb source code is basic and simple i made it my self
|
|
| Back to top |
|
 |
glenndr_15
Joined: 27 Mar 2009 Posts: 28 Helped: 1
|
13 Jun 2009 13:55 interface microcontroller with pc |
|
|
|
|
| jeswanthmg wrote: |
Dude its easy try this files.
I have made it work well but vb source code is basic and simple i made it my self |
Ok I will try it. but can you tell me some detail about the program? I mean is the microcontroller vb project and the computer vb project work simultaneously? or I need to run them both? did you try to test it already in the microcontroller?
|
|
| Back to top |
|
 |
jeswanthmg
Joined: 06 Jun 2009 Posts: 15 Location: Bangalore
|
14 Jun 2009 8:02 interface microcontroller |
|
|
|
|
Dude i tested and made many projects on 8051 PIC with serial interfacing.
The source codes which i gave you is different the PIC software does not work in sequence with VB source code just modify the software in PIC controller. see this file too which is of 8051. i gave all the files which made me understand and connect any controller to serial port good luck.
IF even now you cant get it working may be i can give you the complete PIC and VB source code which work in sequence after 4 days cause i am a bit busy now.
|
|
| Back to top |
|
 |
medorpg
Joined: 04 Nov 2009 Posts: 2
|
04 Nov 2009 19:17 How to interface microcontroller to PC using serial port? |
|
|
|
|
| that was amazing
|
|
| Back to top |
|
 |