Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 14th February 2004, 04:19 AM   #1
Default PIC 16F877 serial port coninication

HI!
I just start my porject of PIC progarmming.
Can some one please help me to write a simple program on how to send a analog data through serial port on PC.

How can VC++ read the data from PIC.

Thanks.
Anderson Goh
__________________
Anderson goh
hgoh2 is offline  
Old 14th February 2004, 11:37 AM   #2
Default

You have to use CreateFile, ReadFile and WriteFile to send data to the serial port.

Use CreateFile with "COMx" as devicename to get an handle
There's info on MSDN

http://msdn.microsoft.com/library/de...createfile.asp
Exo is offline  
Old 14th February 2004, 12:51 PM   #3
Default

I made a wrapper class for visual c++ 6.0 ... if you're interested :!:
Exo is offline  
Reply

Thread Tools
Display Modes




All times are GMT. The time now is 01:28 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker