need sample code for serial port(DB9) from PIC16F877A to VB 2008 ?

Thread Starter

pink bunny

Joined Feb 27, 2010
7
hello,

pls help me......
i hve a project which i hve to control the climate rate with sensor that been connect to PIC16F877A using DB9. and from the PIC16F877A to VB 2008.
can someone help me to create a code to display the sensor rate at the textbox in VB 2008? how?


pls help me................
someone................


:(
 

spinnaker

Joined Oct 29, 2009
7,835
hello,

pls help me......
i hve a project which i hve to control the climate rate with sensor that been connect to PIC16F877A using DB9. and from the PIC16F877A to VB 2008.
can someone help me to create a code to display the sensor rate at the textbox in VB 2008? how?


pls help me................
someone................


:(
You don't give any specifics on what kind of help you need.

There is tons of code and sample projects out there that deal with Rs232.


You will want to look at a MAX232 chip for your interface.
 

Thread Starter

pink bunny

Joined Feb 27, 2010
7
i dun hve any circuit or start my program yet...........
i need a coding which the rate of a sensor can be read in a textbox using serial port.....
 

Thread Starter

pink bunny

Joined Feb 27, 2010
7
You don't give any specifics on what kind of help you need.

There is tons of code and sample projects out there that deal with Rs232.


You will want to look at a MAX232 chip for your interface.




thanks.............
i just wanna ask............
do i need the both of it which are rs232 and max232 or i only need max232...?????
 

spinnaker

Joined Oct 29, 2009
7,835
markd77, so i need both to interface with pc?????

Yes and no.

RS232 is an interface standard. It is already a part of your PC's serial port. So yes you need it but it is already supplied by your PC.

But you must design your PIC circuit so that it complies with RS232. This is what the MAX232 will help do for you.



Your questions tell me you are not very experienced with PICs. If you have not written a simple program to have the PIC turn on an LED. You might want to start there.

You can then move on to more complicated things like interfacing to RS232.

Or instead of using a PIC, you should consider using an Arduino board. Much of the circuitry for RS232 is already done for you.
 

symqwerty

Joined Feb 22, 2010
31
I hv the code that you asking for. It's fairly easy since you use VB.NET. However, have you get your hardware ready?

Let's divide it into 2 groups, hardware and software. I guess that you know how to program your PIC ( i can give u the code but it written in C ) and what you need is to read data from the PIC and displayed on the textbox, right?

On hardware portion, you have options to choose either to use MAX232(plus DB9 connector) or FT232R chip( it is rs232 to usb converter ). the 1st option already mention by other forumer. The 2nd option allows you to use USB port as a virtual comport (or RS232). Don't worry about the software part because we will treat it the same way.
 
Top