# migrating to USB (pic micro)

Status
Not open for further replies.

#### trennonix

##### New Member
Hi,

I've been working on a project based on the PIC 16F628A and my software is near completion; now i want to interface it with a PC;

i thought about it and i think i should choose a USB connection since it's available on every modern PC unlike the serial port, and it would be much easier to use for you average user rather than a usb to serial converter

thus i have to port my code to an 18F micro
the thing is, that when it comes to 18Fs and USB, i'm in unknown territory

i have never touched an 18Fxxxx

Does 18F and 16F share the same instructions set or is 16F code at least compatible with 18F?
And how hard is it to interface through USB (pic and pc side)? (bear in mind that i'm programming in assembly <pic side>)

btw: I searched "pic usb" in this forum and it gave no results, i searched "pic" as well: same thing

Thanks

#### Wp100

##### Well-Known Member
Hi,

You will find the 18F a lot easier to use than the 16F as most of the page and banking stuff is gone and there are a lot more good instructions.
Its easy to migrate most 16F codes over to them.

The bad news is the usb chips need C to run, I use assembler myself and have the same problem ! - have seached many times for usb in assembler but none found.

However as you say you can still use a rs232 /USB converter cable.

Last edited:

#### trennonix

##### New Member
I'm designing what i hope to be a commercial product, so i didn't want my clients to have to deal with going to the Hardware view in "My Computer" to know the which COM port to use (COM1 ...)

but i suppose being in prototyping stage this wouldn't be much of a big deal and i can always give super clear documentation.

i might use an 18F dedicated for USB connectivity, by that i mean that my 16F will speak to the 18F which in turn will speak to the PC, much cheaper than a USB-RS232 converter

#### blueroomelectronics

##### Well-Known Member
Either use an FT232R or rewrite the software to work on a single 18F2550

#### nickelflippr

##### Member
Take it from someone who knows zero about USB or C18, you can start experimenting with the Microchip USB framework, no problem. There is a software folder called Microchip Solutions, which has pre-compiled MPLAB projects. Just run through the lab examples, or just download the hex files, and see what you come up with. You will surprise yourself!

If your program isn't too big, the new 18f14k50 might do it for you, for a cheap, one chip solution.

#### trennonix

##### New Member
seems nice, i'll download it right away, Thanks

#### trennonix

##### New Member
i found a program called "HIDmaker FS", it's a great program with a greater price tag!!!
it's supposed to create USB code on both PC and PIC in most languages but it costs
599.95!!!!!
AY CARAMBA!
is there any free alternative? something nice and open-source as in both free speech and free beer??

#### blueroomelectronics

The $99 Swordfish BASIC complier has USB functions. #### trennonix ##### New Member for starters, 100$ is still expensive, and my program is in mpasm, i don't want to rewrite the whole thing;
plus i've never bought anything online :S
Please, anything free and that can give code in mpasm and preferrably C# (for PC side software)

btw, what's a bootloader? do i install that before putting my program on the pic or is it part of my program?

#### LifeForce4

##### Member
Status
Not open for further replies.

Replies
6
Views
5K
Replies
3
Views
1K
Replies
9
Views
2K
Replies
5
Views
3K
Replies
1
Views
573

Loading