This is work in progress (14-2-2010). The PIC is a family of microcontrollers developed by Microchip. On this page we will focus on the PIC18F4550 which is a microcontroller with USB support. Back in 2007 I did a lot of work on this, but due to lack of time I was forced to put it aside for a while, until now. In the meantime the development software has changed a bit, as well as the Linux distributions, so we will be going back to square one, which is a good opportunity for newcomers to join in. First you need the microcontroller itself of course, and you need a programmer in order to program the microcontroller. You can build a programmer for yourself, as I did back then. However nowadays it is not really worth the effort as you can buy the Pickit 2 programmer for under 50 euro's, and it is often more reliable than a low cost self made programmer. Installing the software for the Pickit 2 programmerWe will install and use pk2cmd which allows you to control your Pickit 2 programmer:
Now connect your Pickit 2 and verify it is working by using this command: pk2cmd '-S#' The required firmware version on the Pickit 2 is v2.32.00 or later, so if an earlier version is reported, it is time to upgrade the firmware:
Here is a list of commands commonly used:
Connecting the programmer to the microcontrollerThe pinout of the Pickit 2 is:
To connect the Pickit 2 to the PIC18F4550:
It is possible to use the Pickit 2 programmer as (limited) power supply for your application circuit. Getting and building PUFThe latest release of PUF is at the time of writing from 2007, so you are probably better of using the nightly CVS snapshot which you can find here: http://gforge.enseeiht.fr/snapshots.php?group_id=10. To build, first install flex and bison, extract PUF, cd to it, then do the following: cd device/puf aclocal automake autoconf ./configure make The pinout of the USB connectors:
host, A: +-----------+
| --------- |
| - - - - |
+-----------+
1 2 3 4
slave, B: ---------
/ - - \
| 2 1 |
| 3 4 |
| - - |
+-------------+ (chassis part)
(This document is not finished. To be continued...) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
