0

ScoreSure Nokia shield and ICSP

Posted by Chris on Tuesday, September 22, 2009 in , , , ,
Just two days coding and as well as a golf-score-recording-device, we now have the ScoreSure Petanque Pro: a device for recording scores after each "end" in a game commonly known as "boules". (The game itself is called petanque, the boules are the little heavy silver things that get thrown around: this is different to most games, like football, darts, bowls etc., where the game takes its name from the equipment used).
By creating our first ScoreSure Petanque Pro device, we've managed to dovetail beautifully into the Score Results website which is almost complete (since the first lot of results on the Score Results website are all for the Brighton and Hove Petanque Mixed Doubles League.

As well of lots of development in recent weeks, theres' also been talk of getting the local university involved in market research and product development. That means it's time to get the device off the breadboard/prototyping hardware, and packaged up into something that you can hold in your hands! We've been talking about doing this kind of thing for ages now, but this time it's different. This time, we've been given a deadline!


So here's the PCB layout of the shield. A few of the PIC pins have had to be re-mapped. The reason for this is because we're going to make up a few "blank" devices - Nokia screen, batteries, eeprom and PIC, and then program them afterwards. This means that SMT (surface mount technology) can be used for production at a later stage, because the PICs can be programmed in place, using ICSP (in-circuit serial programming).

In fact, it turns out that the programmer we use for dropping code onto our PIC chips uses this anyway - it's a socket-based programmer (see below) but it also has an ICSP header for programming chips this way.

(incidentally if anyone else has one of these programmers, they can be used to write code to both 16F and 18F chips - the way we do it is to keep two different versions of firmware on two different 16F628A chips. Simply swap in the firmware you need (did you notice that the programmer uses a PIC chip itself?) and run the appropriate software. We use DonkeyProg for the 18F series of chips and DIYPack25 for burning to the 16F chips.

The reason for remapping the pins is to make sure that the MCLR, RB6 and RB7 pins are isolated. These are the pins needed to program the chip in place. It is possible to keep using these pins and build simple isolator circuits for when programming takes place (programming requires raising the voltage on the MCLR pin to about 13v so you need to protect the rest of your circuit) but we found it easier to just keep these pins clear and only use them for ICS programming. On the PCB layout we run MCLR, 5v, ground, RB6 and RB7 to a pin header row and then use an old IDE (hard drive) cable to connect to the ICSP header on the PIC programmer.

We've just completed our first test and it was successful! We've managed to program an 18F2455 chip without removing it from the breadboard and dropping it into the socket. So there's nothing stopping us now from building a few "shields" which clip onto the back of the Nokia colour screen from NuElectronics and programming them at a later date!



(for the observant amongst you, comparing this photo to previous ones, you'll see that some extra wires have been added - and the Nokia board removed for testing - which cross over the PIC and create a 5-pin connection on the left hand side of the breadboard: the red wire from MCLR which was previously connected to 5v is now the programming voltage wire and the MCLR fuse on the chip has been turned off so that pin no longer requires 5v to keep the PIC running. The 5v and ground pins have been carried over to the ICSP connection on the left of the breadboard and pins RB6 and RB7 have been taken across via two yellow wires.)

Because the PIC can be programmed without physically putting it into the programmer, there's nothing stopping us from making a circuit board and soldering everything in place. Let's crack open the Ferric Chloride and get etching....

0 Comments

Post a Comment

whos.amung.us

Copyright © 2009 .Nerd Club All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive Supported by Blogger Templates.