Magyar English

pic sdcc


Gather knowledge and successfully use the USB interface in a micro controller produced by Microchip, with the open source sdcc compiler. For most of you (including me) this is mystical area. Maybe you have checked the USB specification and found it too complex due to many technical aspects. No need to afraid of it, we will try to make it easier.

Current situation

In case you searc the internet, you can find some example projects. These are mostly based on the C18 compiler from microchip, using the MCHPFSUSB framework (currently v2.3). If you download it and try to figure out how might it work, you might get confused. A USB functions are divided into 9 separate files, according to its logical structure. I think for a newcomer, this makes the usage more mystical rather than easy. Luckily, we might find some pretty useful projects. A quite good collection can be found on homepage of Xiaofan Chen.

  1. PUF - Smart system, but for a quick start, it is too much. Its main advantages are built on sdcc and it contains a bootloader, to allow downloading the new firmware through USB, so we need a programmer for the first time only!
  2. http://pe.ece.olin.edu/ece/projects.html - The most useful projects to a beginner! A problem is only the compiler. It cannot be compiled with sdcc (it is created to compile with C18).

I try to port the latter to sdcc. The task is not so big, but easy make a mistake (maybe for me as well).

The source file is the following: lab1c. The converted file is the following: lab1c sdcc.

Unfortunately, it is not yet tested, but I hope it works. If you check it and find it useful, please report it.

Page last modified on 2009.03.08. 17:04:18

Copyright Alex 2007-2015