Electronics-Related.com
Forums

PIC16F1454/5/9 USB example

Started by Sonnich Jensen October 23, 2015
Hi all

I have been looking for any example for how to use USB - for the PIC16F1454/5/9 USB example -  even just transferring a single byte. 

Can anyone point me to an example:

1) example of pic code/usb functionality
2) USB driver for PS (some ini file), what to put there and how to use it

I am used to communicating to com port (usb act the same way), but the driver thing is new to me

wbr
sonnich


On a sunny day (Fri, 23 Oct 2015 12:07:51 -0700 (PDT)) it happened Sonnich
Jensen <sonnichjensen@gmail.com> wrote in
<365cf47d-a7fe-4c2b-9ae6-856338a4e662@googlegroups.com>:

>Hi all > >I have been looking for any example for how to use USB - for the PIC16F1454/5/9 USB example - even just transferring a single >byte. > >Can anyone point me to an example: > >1) example of pic code/usb functionality >2) USB driver for PS (some ini file), what to put there and how to use it > >I am used to communicating to com port (usb act the same way), but the driver thing is new to me > >wbr >sonnich
I circumvent that problem by using serial to USB modules, and just use RS232. That also takes care of USB licensing: http://www.ebay.com/itm/180953299346 Now any terminal program can work with it, and you have 5V power for your PIC too, as well as 3.3V. And a cheapr PIC (no USB). For 99 cents....
"Sonnich Jensen"  wrote in message 
news:365cf47d-a7fe-4c2b-9ae6-856338a4e662@googlegroups.com...

> Hi all
> I have been looking for any example for how to use USB - for the > PIC16F1454/5/9 USB example - even just transferring a single byte.
> Can anyone point me to an example:
> 1) example of pic code/usb functionality > 2) USB driver for PS (some ini file), what to put there and how to use it
> I am used to communicating to com port (usb act the same way), but the > driver thing is new to me
Best bet is to download the Microchip Library of Applications (MLA) and find the help_mla_usb.pdf file to read about the USB framework and functions. There are demos for CDC and USB-Serial applications, designed for their low pin count USB demo board which has the PIC18F14K50 but can be used with the PIC16F145x. The board is $40 but has only a few parts so you could easily make your own: http://www.mouser.com/ProductDetail/Microchip/DM164127/?qs=3sfQLUxeirGXO7fBdbWfyA%3d%3d Data Sheet with schematic: http://www.mouser.com/ds/2/268/41356A-62914.pdf I have implemented USB on my own ORTM-4H product, using the PIC18F2550, but I had to use the older USB stack and the C18 compiler (and perhaps also the 8.9x IDE). You may download what I have - which includes some changes to the stack that appear to work - but it's not completely debugged, and the newer stack probably takes care of these issues that I had with XC8 a few years ago: http://enginuitysystems.com/files/XC8.zip There is also a lot of information on the Microchip forum where I (and others) discussed the problems. Paul
On Fri, 23 Oct 2015 12:07:51 -0700, Sonnich Jensen wrote:

> Hi all > > I have been looking for any example for how to use USB - for the > PIC16F1454/5/9 USB example - even just transferring a single byte. > > Can anyone point me to an example: > > 1) example of pic code/usb functionality 2) USB driver for PS (some ini > file), what to put there and how to use it > > I am used to communicating to com port (usb act the same way), but the > driver thing is new to me > > wbr sonnich
Maybe this will help? http://code.google.com/p/16fusb/ It's supposed to be a software-only implementation of USB. You may also look around the web for 'Igor &#268;e&scaron;ko' who apparently inspired people to write these software-only implementations and perhaps 'V-USB' whose homesite has a page full of links. One of those links is the above code.google.com one.