Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB communication with pic

Status
Not open for further replies.
You'll have to use C on the PIC but on the PC you can use C++
**broken link removed**
 
Thanks for the link. I'll check it out. I actually have a bigger problem. The circuit I'm working with already has a PIC16F886 on, which only has a RS232 serial port. But my laptop does not have a serial port, only USB. I've heard of a usb to rs232 converter, but they are not very stable. Is it possible to use the usb port as a virtual serial port maybe, and do rs232 communication directly to the pic?
 
Albert Smit said:
I've heard of a usb to rs232 converter, but they are not very stable. Is it possible to use the usb port as a virtual serial port maybe, and do rs232 communication directly to the pic?

Some people use an FT232RL USB converter chip, I have not heard of the stability problems that you mentioned.
Here is an example of a project using that chip:
**broken link removed**

Alternatively there are many ready-made usb to serial converters available quite cheaply from ebay etc.

I think it would be almost impossible to do software only usb comms using your 16f886 chip. Someone has tried it already but had problems with getting the clock speed high enough (although it does work with AVR chips)

**broken link removed**

Another option would be to use a PIC18F2455/2550/4455/4550 chip which has a hardware usb interface built-in.
 
Thanks. I thought of using a 18f2550 but its pin outs doesn't match with the 16f886 on my PCB.
The FT232RL chip seems easy to use. I'll try the pre-made converter first. Just 2 questions on using a pre-made converter: Do I still need to put in a MAX232 before the pic's UART to convert to serial levels or does the converter do that for me? And on the computer/USB side, is this then USB comm. or RS232?
If it is usb communication, can anyone give me some help on that if I'm using C++.

Thanks allot for the replies!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top