+ Reply to Thread
Results 1 to 10 of 10

Thread: migrating to USB (pic micro)

  1. #1
    trennonix Newbie
    Join Date
    Apr 2009
    Location
    Lebanon
    Posts
    145

    Default migrating to USB (pic micro)

    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


  2. #2
    Wp100 Good Wp100 Good Wp100 Good
    Join Date
    Feb 2009
    Location
    England
    Posts
    260

    Default

    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 by Wp100; 26th July 2009 at 08:17 PM.

  3. #3
    trennonix Newbie
    Join Date
    Apr 2009
    Location
    Lebanon
    Posts
    145

    Default

    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

  4. #4
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,696
    Blog Entries
    5

    Default

    Either use an FT232R or rewrite the software to work on a single 18F2550
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  5. #5
    nickelflippr Good nickelflippr Good nickelflippr Good nickelflippr Good
    Join Date
    Oct 2006
    Location
    Oregon, USA
    Posts
    487

    Default

    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.

  6. #6
    trennonix Newbie
    Join Date
    Apr 2009
    Location
    Lebanon
    Posts
    145

    Default

    seems nice, i'll download it right away, Thanks

  7. #7
    trennonix Newbie
    Join Date
    Apr 2009
    Location
    Lebanon
    Posts
    145

    Default

    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??

  8. #8
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,696
    Blog Entries
    5

    Default

    The $99 Swordfish BASIC complier has USB functions.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  9. #9
    trennonix Newbie
    Join Date
    Apr 2009
    Location
    Lebanon
    Posts
    145

    Default

    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?

  10. #10
    LifeForce4 Newbie
    Join Date
    Apr 2003
    Location
    Utah
    Posts
    57

    Default

    Check this link for information about what a bootloader is. (PIC micro and C - bootloader)
    --{Kyle}--

+ Reply to Thread

Similar Threads

  1. micro-P
    By khairulnisa in forum Electronic Projects Design/Ideas/Reviews
    Replies: 5
    Latest: 8th February 2009, 01:25 AM
  2. Stuck on Migrating 16F to 12F
    By bigal_scorpio in forum Micro Controllers
    Replies: 12
    Latest: 23rd October 2008, 10:47 AM
  3. migrating from 8051 to AVR!
    By ikalogic in forum AVR
    Replies: 5
    Latest: 3rd May 2008, 11:16 AM
  4. migrating code 16F84 ==> 16F628A
    By whiz115 in forum Micro Controllers
    Replies: 8
    Latest: 14th March 2008, 10:56 PM
  5. Migrating 16c57 to 16F57
    By j_norrie in forum Micro Controllers
    Replies: 6
    Latest: 31st July 2006, 03:03 PM

Tags for this Thread