Friday 27 March 2009

Prototyping Test Equipment

I am trying to construct a prototype device that will read in analogue data signals, do some processing on them, display them to an LCD screen, store them to some form of electronic memory and allow the data to be downloaded vis a USB connection to a PC.

In order to do this my starting point was an Olimex PIC development board. I bought the PIC-USB-4550 development board from Cool Components. This was pretty cheap (around £20) and arrived quickly.
You can read the features of the board on the website but the main reasons I used this board and device (PIC 18F4550) were:
* Had a built in USB 2.0 interface
* 13 channels of 10bit analogue inputs
* 32kB program memory
* 2kB RAM
* Numerous additional I/O pins
* Bootloader so I didnt need a programmer (more on this feature in another post)

This was wired up along with a small breadboard prototyping area, an LCD 16 x 2 display and some I/O devices (8 x LEDs, 3 x push switches, 8 x DIP switches, potentiometer, thermistor and buzzer - from an old PIC16F84 delopment board I had). USB and ICSP (In-Circuit Serial Programmer) sockets were already on the development board.

So now I had most of the hardware (I will build up more as this project progressess), I also needed to look at the software options. I had experience with basic assembler programming and knew that it would be a hassle to do all the programming in assembler (I want to have a life as well). So I looked at available C compliers. After looking at a number of options (maybe I'll put that into another post) I am using the free one from Microchip (C18 c compiler). They supply this for a free trial period of 60 days, after which it becomes limited to non-optimised compliation. But its working OK for now - maybe when I have some money and need for it I can upgrade to a good paid-for version.
In order to create the HEX files for programming I used Microchips MPLAB suite, with which the C18 compiler interfaces. This is also available for free from Microchip.

In addition to this another program is required to write programs to the PIC18F4550 using the bootloader (i.e. via a USB connection). This is called theMCHPFSUSB Framework (Catchy title, eh?) and can be downloaded here.

So thats about everything you need. Sounds easy, doesn't it?
I'll start to write up experiences with using this in future posts.

EDIT: It might also be useful to note that I am using computer running Windows Vista.....

First post

This blog is a record of my attempts to program PIC micro controllers from Microchip.
It is mainly meant as a record to myself of what I did and tricks I have learnt, but I hope it might also be useful to others starting out on PIC micro controllers.
I'm not going to make this look fancy nor do full spell checking - its mainly a reference.
Please get in touch if you have any questions/queries/useful information for me.
Lets begin....