Connecting your Microcontroller to PC

Microcontroller Topics
Post Reply
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Connecting your Microcontroller to PC

Post by Magneto » Sun May 02, 2010 10:46 pm

Most of the people complaining that they can not connect there microcontrollers to PC. The reason for this in many occasions , is wrong pin connections between MAX232 IC and PC and also MAX232 IC with microcontroller. Here you can
see very clear diagram , which explain all the story between PC- MAX232 - Microcontroller inter - connections.
max232ToPC.JPG
max232ToPC.JPG (50.74 KiB) Viewed 8824 times
SukhdeepMankoo
Lieutenant
Lieutenant
Posts: 92
Joined: Tue Oct 27, 2009 7:50 pm

Re: Connecting your Microcontroller to PC

Post by SukhdeepMankoo » Tue Jun 22, 2010 10:59 am

Note DB-9
pin 3 is the transmit pin of PC.
pin 2 is the receive pin of PC.

I have seen the schematic diagram, if u will interchange the pin2 and pin3 of DB-9 connector, it will work.
DeepakPatil23
Sergeant
Sergeant
Posts: 20
Joined: Mon May 23, 2011 7:16 pm

Re: Connecting your Microcontroller to PC

Post by DeepakPatil23 » Tue May 31, 2011 4:20 pm

Hi Magneto,

Do you have any code for this :?: its quite interesting to connecting micro-controller to PC

Regards,
Deepak Patil
SukhdeepMankoo
Lieutenant
Lieutenant
Posts: 92
Joined: Tue Oct 27, 2009 7:50 pm

Re: Connecting your Microcontroller to PC

Post by SukhdeepMankoo » Tue May 31, 2011 4:26 pm

which microcontroller are you trying to connect?
DeepakPatil23
Sergeant
Sergeant
Posts: 20
Joined: Mon May 23, 2011 7:16 pm

Re: Connecting your Microcontroller to PC

Post by DeepakPatil23 » Tue May 31, 2011 5:55 pm

I have 2 uC AT89C2051 and PIC16F628A. any one will do preferably PIC16F628A.
User avatar
Shane
Captain
Captain
Posts: 226
Joined: Sun Jul 19, 2009 9:59 pm
Location: Jönköping, Sweden

Re: Connecting your Microcontroller to PC

Post by Shane » Tue May 31, 2011 8:08 pm

If you are a beginner, I would recommend you to use either PIC16F877A or 16F84. Both are easy to handle and more importantly there are lots of support on the web. In addition to the first diagram, you could use the following one as well. (Both same).
PIC_serial_port_hardware.gif
PIC_serial_port_hardware.gif (18.23 KiB) Viewed 8634 times
Here are some C codes I found from HI-TECH C samples.

Non-interrupt drive version
serial.zip
(1.34 KiB) Downloaded 387 times
Interrupt drive version
iserial.zip
(2.63 KiB) Downloaded 385 times
DeepakPatil23
Sergeant
Sergeant
Posts: 20
Joined: Mon May 23, 2011 7:16 pm

Re: Connecting your Microcontroller to PC

Post by DeepakPatil23 » Wed Jun 29, 2011 7:27 pm

Hi,

I got a one problem, My PC gets down HDD problem. I have Laptop but in laptop LPT port or Serial com1 RS232 port not available only USB is there. Now biggest problem is my JDM programmer is of RS232 and i have USB port now how to connect USB to RS232 any Circuit available :?: ?? I have MAX232 IC.

:cry:
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Connecting your Microcontroller to PC

Post by Neo » Thu Jun 30, 2011 5:05 am

JDM programmer will not work from USB-RS232 converters due to power issues (we have already discussed this and please search for that). Best solution I see is to buy a PICKit3 programmer which is very cheap now.

Check this eBay link. This has debug facilities as well in MPLab.
Post Reply

Return to “Microcontrollers”