Author Topic: PIC18F Software Problems  (Read 5022 times)

0 Members and 1 Guest are viewing this topic.

Offline House91320Topic starter

  • Regular Contributor
  • *
  • Posts: 176
PIC18F Software Problems
« on: December 21, 2010, 11:17:51 pm »
I'm trying to create USB data acquisition device with a PIC18F4550 and my friend and I are having a real hard time getting the software side of it to work. Does anyone know of a good tutorial that can explain the following?

Which bootloader to use?
Should we use the HID bootloader, and if so, how do we get it to work?
 

Offline Gary Servin

  • Supporter
  • ****
  • Posts: 11
  • Country: py
  • Building Robots!
Re: PIC18F Software Problems
« Reply #1 on: December 22, 2010, 02:34:21 am »
What compiler are you using?? Microchip's Application Library comes with a Bootloader project for MPLAB C18.
 

Offline House91320Topic starter

  • Regular Contributor
  • *
  • Posts: 176
Re: PIC18F Software Problems
« Reply #2 on: December 22, 2010, 02:53:56 am »
maybe i should explane more, pc recognizes the pic and the HID driver woks but beyond that we are stuck what, i would like to get to the point where i can turn leds on with the computer. any one got any ideas? ???
 

Offline Gary Servin

  • Supporter
  • ****
  • Posts: 11
  • Country: py
  • Building Robots!
Re: PIC18F Software Problems
« Reply #3 on: December 22, 2010, 03:14:52 am »
Depends on which compiler you are using. Here's an article I found when I started with USB on PICs. But they use Hi-Tech compiler.

http://www.waitingforfriday.com/index.php/Building_a_PIC18F_USB_device


 

Offline metalphreak

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: PIC18F Software Problems
« Reply #4 on: December 27, 2010, 02:59:03 pm »
The bootloader is only for loading a new program onto the PIC via USB. It has nothing to do with communicating with a host device.

If you download the USB framework from microchip's website, there are plenty of examples. The easiest way to implement a basic device is to use their framework that enumerates the PIC as a Serial Port on the host PC. Then its pretty easy to use serial communication for control/data transfer. There's even an example app for turning LEDs on and off with all the Visual Basic projects/code included.


The HID bootloader takes up 0x1000 space while the MCHPUSB/PICDEM bootloader only uses 0x0800. However, you need to install specific drivers on the host PC to use MCHPUSB. The HID bootloader is plug and play.

There is also a HID driverless framework for communication as well but its a bit more complicated to use.
« Last Edit: December 27, 2010, 03:01:18 pm by metalphreak »
 

Offline migsantiago

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: 00
    • MigSantiago's Web Site
Re: PIC18F Software Problems
« Reply #5 on: December 27, 2010, 06:15:41 pm »
Bootloaders sometimes interfere with the main program on the PIC. The configuration bits that are fixed for the bootloader may not be compatible with the configuration bits that the main program is relying on.

That's why I never use bootloaders. I'd recommend that you buy an external programmer so that you don't get any misconfigurations.  ;)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->