CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC interfacing with USBtoUART and then to PC?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
slurp



Joined: 20 Mar 2011
Posts: 4
Location: msia

View user's profile Send private message Yahoo Messenger

PIC interfacing with USBtoUART and then to PC?
PostPosted: Mon Mar 21, 2011 12:11 am     Reply with quote

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.

Smile
temtronic



Joined: 01 Jul 2010
Posts: 9225
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 21, 2011 10:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 22, 2011 9:31 am     Reply with quote

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

View user's profile Send private message Yahoo Messenger

PostPosted: Wed Mar 30, 2011 7:24 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 30, 2011 11:59 pm     Reply with quote

Quote:
can i use the UARTtoUSB converter by Cytron Tech?

http://blog.cytron.com.my/2009/07/14/uc00a-more-than-a-usb-to-serial-converter/=
Yes you can use this.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group