PDA

View Full Version : USB comms



rastan
- 19th March 2005, 22:47
Hey, im in the 'interested' stage of communicating with the pc. Moving on from serial communication which has worked quite well on both the hardware (pic) side and software (pc) side, having both being fairly easy to implament (with some hard work :D )

i would like to investigate the use of USB comms, since most computers can easily accomadate many USB ports compared to most modern computers having 1 serial port. At the moment im just looking into the hardware side, because i know for a fact that the software is going to take twice as long.

Since the 18f2550 is not supported in PBP yet, i have leant towards the converter route. FTDI's usb to serial looks nice, but i have also found maxims DS2490 (http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2995) that uses their 1-wire protocol. It looks more powerful since it has lots of usb commands that i don understand yet :) compared to the simple com port emulation that the FTDI chip does.

has anyone played with usb converters? and has anyone found any interesting links/sites/projects/code that could be helpful fo me???

many thanks,
phil

Tissy
- 21st March 2005, 11:18
According to MeLabs WEB Site, the 18F2550 is supported in the latest version of PicBasic Pro.



Latest Release: 2.46
Adds support for PIC10F202, 206, PIC12F635, PIC16F59, 636, 639, 785, 913, 914, 916, 917, PIC18F2410, 2420, 2455, 2480, 2510, 2520, 2550, 2580, 4410, 4420, 4455, 4480, 4510, 4520, 4550, 4580, 6310, 6390, 6627, 6722, 8310, 8390, 8627 and 8722.


Regards,

Steve

Roy
- 21st March 2005, 14:16
Hi Rastan !

I don't know your goal but why dont you make it easy for yourself and use a USB to serial converter ?

I done that and if you take off the insulation on the usb cable you can take 5 volt from the usb port and feed your application with that.

Then you map the converter as COM8 for ex. and it works like the rs232 communikation you already done.


Brgds Roy

rastan
- 21st March 2005, 17:42
yeah i did think of that, but i thought that the serial to usb chips were less functionable than others. in what way im not quite sure. it seems like they are made to do one thing and that only. for instance it says that it can transfer data at full usb 2.0 rate, which is 480MB/s, but surely isnt that then limited by the USART speed??? at 115200 baud??

anyway, for now, i do think that the serial to USB chips are a good idea, so i already know that FTDI do them, but does anyone else know of any other company that does the same sort of thing?? (assuming its available to the UK)

thanks,

phil

NavMicroSystems
- 22nd March 2005, 00:05
...it says that it can transfer data at full usb 2.0 rate, which is 480MB/s, but surely isnt that then limited by the USART speed??? at 115200 baud??

rastan,

we would be really interrested in your PIC solution
(hardware & software)
that deals with data @ 480Mb/s

rastan
- 22nd March 2005, 20:19
ok, no need to to be sarcastic. i just thought that it would be possible using sepecific hardware.

still the question remains. does anyone else know of any other simple USB to 'something' chips to use??

cheers, phil

NavMicroSystems
- 23rd March 2005, 00:54
FTDI or PROLIFIC is what you should look at.

Tissy
- 23rd March 2005, 12:16
Depends of course what you want to do with the USB Interface and the IO, but this may interest you : http://www.delcom-eng.com/products_USBIO.asp#USBIO

It's a simple USB Interface Chip that has a number of IO lines. It comes with its own DLL and example code etc.

This Chip does exactly what i want, however, probably like you, i want to perform the task using a PIC and not a third party chip.

Hope its of use anyway.

Regards,

Steve

rastan
- 23rd March 2005, 17:29
ok thanks tissy, but unfortunatly there not in the uk, but anyway. I think im gonna go for the FTDI chip because it looks nice and simple and not too expensive, £3.20 or roughly $4.80, then later on see if i can do something with hardware (i.e. pic18f2550)

cheers,

phil

OXIMBIT
- 24th March 2005, 17:14
Steve

As per our PM's I have been unable to mail you direct the info so have a link and some demo programs here to show you how easy USB is in Basic.

I have to point out that I don't program any more in Pbpro but the USB commands should be simular. Although I note that you can only send an array in Pbpro not variables on there own and you don't have direct access to the USB buffer. I can use it as a String for my own code. Apart from that and a few other differences e.g. the lack of Auto option you will find it very interesting reading.

The info is at the back under USBPOLL, USBIN and USBOUT. Down load the info Here (http://tjbsystems.com/manual.pdf)

Also find some basic demo code