USB communication with PIC

Status
Not open for further replies.

Vizier87

Active Member
Hi guys.. I'm having trouble googling around about this stuff, so here goes.
What is the simplest way to transmit/receive data to a PIC18F4455 which can be directly USB connected to a PC/laptop? I have VB 2008, where some guys said that can be used for this purpose, but i'm getting nowhere...
 
The easiest way is to use MicroChip's **broken link removed** which is available as a link from the **broken link removed** page.
 
Thanks a zillion man. I'm still downloading it with our crappy wireless signal... but I'm good.
So the link is Microchip Application Libraries v2009-08-31.zip right?
Is it a standalone software or is it to be incorporated into a compiler like MikroC?
 
Yes. the zip file contains a bunch of code. The USB framework is part of that.
The code is in C which is compatible with MicroChip's C18 compiler which can also be downloaded for free. The free student edition will work fine and even when it "expires", it still compiles but just with some optimizations turned off. I think the code also supports HiTech C. It did when I was playing with it a year or so ago.
 
Follow the previous suggestion from Russ Hensel: UBW.

It's a complete USB PIC project with a "firmware" (Firmware ver 1.4.3) that implements simple text commands to drive PIC I/O pins. The commands are sent using a sort of "usb serial emulator" so a simple VB 2008 program can drive the PIC board.
 
Yeah.. I got VB 2008, but how do I get to the part which configures the USB outputs of my laptop? The software is like... too general for me.
 

The UBW can be recognized by the specific software provided, right? But how about PIC184455 which is wired directly so that the USB connection is configured? Can it detect that as well?

Kchriste: I've just completed downloading the software. I'll need to maneuver it before using it properly. Thanks.
 
Last edited:
The UBW software connects to the PC as a virtual COM port. No specific software needed.

3v0
 
so that means the PIC18F4455 which is directly USB-connected is recognized after installing that software? I mean the MCHPFSUSB_Setup.
 
so that means the PIC18F4455 which is directly USB-connected is recognized after installing that software? I mean the MCHPFSUSB_Setup.

As long as the PIC is programmed accordingly - but I'm not sure what you mean by 'directly USB-connected'?
 
Look at this tutorial:
UBW tutorial

UBW is just a generic PIC18F2550, 4550, 4455 board with a bootloader and an optional program (named "firmware" in the tutorial) that enables the UBW to be connected to a PC as a virtual COM. From a PC program that is able to connect to a serial port (from Hyperterminal to VB6 to Delphi to VB.NET to ...), you can control every PIC pin. The tutorial helps you in finding the correct driver in the microchip usb software.
 
If you want to talk to the ubw from the pc ( not programming but afterword ) two easy ways are to use liberty basic ( examples from the ubw guy ) or processing which is often used with the arduino, lots of examples out there.
 

Attachments

  • USB.JPG
    36 KB · Views: 1,636
Er.. to put simply, mine is a simple main board which goes according to your tutorial, and the USB connections are made according to the schematic I attached with the previous post.
Well... the UBW link given shows the schematic which is not too different from the standard main board in your tutorials, right?
 

It's just the same, I've even modified one of my 16F876 main boards to add a USB socket and the switches for the UBW.
 

Attachments

  • PIC18F4455.JPG
    34.4 KB · Views: 865
This is not hard if you just follow the UBW tutorial/documentation.

The USB connection is well documented.

Just do it.

3v0
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…