USB communication

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Nicolas
Posts: 1
Joined: Thu Aug 17, 2006 9:29 pm
Contact:

USB communication

Post by Nicolas »

Hi!. We want to develop application with the Β«PICmicro USB MultiprogrammerΒ» and we need to establish a link between a laptop and the PIC via a USB port.

Can we use the usb connector on the Β«PICmicro USB MultiprogrammerΒ» to send and received commands to our pic or did we need to use the E-blocks USB232 board to do so?

Thanks!
Nicolas Faguy

Student Electrical Engineering
Laval University
Québec Canada

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

Post by Ian »

The USB connector used to program the PICmicro is limited to programming only. Using it would also require a special driver to be created as you would need to comunicate to the main PIC chip via the USB programmer chip without them mutally interefering with each other. Not an easy task.

USB is easy for users but a pain for developers.
There is a lot to set up and not all of it is easy or intuitive.

There are two options for USB comms though.

1) USB RS232 module.
This allows both the PC and the PIC to communicate via RS232 serial coms. The USB bit sits inbetween the two but for programming it is essentially invisiable and all the comms function as if it was an actual RS232 system on a COM port.

It is a simple sytem and enables the PC software to be written for COM port messaging, which is well known and well catered for.

It also can be used with any Chip capable of RS232 comms, which is most of them.

2) USB chip
Select a PIC that has USB capabilities and write a USB program for it.
You will need to set up the USB interface and create the USB data structures and messaging, which can be quite complex. There are C and ASM examples and templates, but it is still no easy task.

In addition unless it follows a plug and play interface type such as mouse or joystick then you may need to create custom drivers for the device. Once again not for the faint hearted.

This will give you a proper USB device but will require a lot of work.

Post Reply