View previous topic :: View next topic |
Author |
Message |
slurp
Joined: 20 Mar 2011 Posts: 4 Location: msia
|
PIC interfacing with USBtoUART and then to PC? |
Posted: Mon Mar 21, 2011 12:11 am |
|
|
Good-day to all,
Kindly find as per title.
I am currently tasked to interface a PIC with a PC.
I've decided to use
1) PIC16F84a
2) USB to UART converter (from cytron)
3) PC (running on Windows XP)
4) Visual Basic 2008/VB6.
Q1) According to my decided hardware /software.
Are there relevant codes/links/resources for communication between the PIC and the USB2UART converter?
Q2) VB codes for communication between PC and the USB2UART converter?
I would appreciate anyone's assistance/guidance as I am poor in programming.
I thank you in advance as this is an important college syllabus and I would like to do well in it.
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Mon Mar 21, 2011 10:45 am |
|
|
First step is to make a loopback connector for your USB<_>Serial module.
Now cut your VB program to send and receive data through the module. Confirm it reallly works, by removing the loopback !
Once you are satisfied the VB program works the way you want, then go and program the PIC with the simple 'rcv a character, send it back program that's in the CCS documentation ( FAQ section, I think). Be sure to use a MAX232 chip or equal.
Make up the correct cable( just 3 wires) and connect the computers.
Pressing a key on the PC should go to the PIC and be 'echoed' back onto the screen. Again, pull the cable off to confirm it works... |
|
|
pieter
Joined: 16 Jan 2011 Posts: 27
|
|
Posted: Tue Mar 22, 2011 9:31 am |
|
|
The USB interface part is important as it should also have a windows driver for the PC software in order to communicate to your application.
I use the MPC2200 chip from microchip that has a free windows driver. The Only snag: if you run Windows XP, you have to have XP service pack 3 installed. But it works nice. Regards, Pieter |
|
|
slurp
Joined: 20 Mar 2011 Posts: 4 Location: msia
|
|
Posted: Wed Mar 30, 2011 7:24 pm |
|
|
Hi Pieter.
I would like to ask if the mentioned chip MAX232 ..INSTEAD of using this, can i use the UARTtoUSB converter by Cytron Tech.?
Using Max232 will require me to build a circuit right?
thanks. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|