DEVELOPING
A
PROJECT


Page 15
INDEX

This chapter covers the DEVELOPMENT BOARDS/MODULES to get your PIC project “off the ground.”

After you have carried out the experiments on the 5x7 Display project and built some of the projects, you will want to develop one of your own.
These are the modules to help you:

1. Experimenter Board MkIII
2. 8-Pin to 18-Pin Adapter Type A
3. 8-Pin to 18-Pin Adapter Type B
4. Pseudo ‘508A Module
5. PIC12C508A 6v Express
6. PIC16F84 Express

HOW TO DEVELOP A PROJECT
Before we explain the features of each item, we need to cover how to develop a project. There are a number of prototyping systems on the market such as solderless breadboard, matrix board, strip-board, perf (perforated) board. Here are a few pointers on their suitability.
Solderless breadboard has two main problems. The connections become very loose after the parts have been inserted and removed a number of times, mainly due to the different thickness of the leads and it is easy to knock a component out when you are working on a project. Loose connections also produce a lot of noise and this can be interpreted by the microcontroller as “pulses” and upset the operation of a circuit.
Strip Board and any boards that consist of strips of copper track, need a lot of cutting to separate sections of the track and this makes the board useless for re-use. It also makes the project much larger than needed, due to the blank holes needed between cuts. I would be laughed out of the office if I produced a project in this format. It is just not professional and the strips force you to make the project to suit the board and not the board suit the project.
Matrix Board is one alternative but it has its problems too. It has to be constantly turned over to carry out the wiring between the components. In addition, the components are difficult to remove if a modification has to be made. Matrix Board is suitable for building a project that has already been designed. It is not suitable for developing a project.
One solution is the “birds nest” or “rats nest” approach. The Experimenter Board MkIII has been designed for this mode of construction. It has no holes and all the components are soldered on the copper side of the board, from one land to another. It’s a jumble of components but you can see the whole circuit at the one time. I have found it eliminates a lot of mistakes and is much easier and faster than anything else. It also forces you to make a proper printed circuit board as you cannot use the “jumble” for the finished design.
Paul, our producer of the PC layouts for Talking Electronics, does not use the prototype when CADing the track-work. He only needs a circuit diagram and the size of each component. This means the presentation of the prototype does not come into any other stages of development and thus its main feature is ease of construction and modification. Once you use the Experimenter Board MkIII, you will know what I mean.

The three boards/modules are available for building a prototype:
1. Experimenter Board MkIII. This board has no holes and the components are soldered from one land to another. An IC socket is soldered in the centre of the board and the components are placed around the chip. The board is only small, however it can take either a ‘508A or F84 microcontroller and one additional 16 pin chip.

2. PIC12C508A 6v Express is a matrix board of 21 holes x 22 holes and has the PIC12c508A chip in the centre. Each hole has a circular land and the components are placed on the board and soldered in position. Fine tinned copper wire is used to connect the lands.

3. PIC16F84 Express is a matrix board of 21 holes x 22 holes and has the 16F84 chip in the centre. The oscillator components are also on the board for R/C or crystal.
If you are going to design a project with the PIC16F84, the PIC16F84 Express will make the process of developing a program very easy. Once you have created the circuit on the Matrix section of the board (commonly called the “scratch-Pad” area), all you have to do is “burn” the chip in the 5x7 Display or Multi-Chip Programmer and transfer it to the PIC16F84 Express.


If you are designing a ‘508A project, you can build the circuit on the matrix section of the PIC12C508A 6v Express. This board takes a ‘508A chip but rather than waste a ’508A every time you need to test each part of the program, you replace the ‘508A with an adapter. Three adapter are available. Two are 8-pin to 18-pin adapters and the other is a module containing other features such as single-stepping and adjustable oscillator.

The three adapters are: 8-Pin to 18-Pin Adapter Type A, 8-Pin to 18-Pin Adapter Type B and the Pseudo ‘508A module.
The “8-pin to 18-pin adapters” have an 18-pin socket connected to an 8-pin socket, and although the adapters are a bit “top heavy,” they allow a program to be developed at the lowest cost.

 

THE PSEUDO ‘508A Module
The third adapter is a module holding a PIC16F84, plus a number of components, called a Pseudo ’508A. It has an 8-pin IC socket on a short length of ribbon cable. This is plugged into the socket on the project you are developing, such as the PIC12C508A 6v Express or any of the projects we have presented.

Six LEDs on the Pseudo ’508A show the state of the output lines and three tactile switches allow the chip to the clocked at three different rates.
Normally it is impossible to change from R/C to Crystal as the “oscillator bit” must be set when programming the chip, to reflect the type of oscillator. However, if the oscillator is external, these changes can be made instantly.
The first tactile button SINGLE STEPS the micro through the program you are developing. As you may be aware, the manufacturer of the PIC chip has a software package that will single-step through your program and show the state of each file after an instruction. This sounds like a fantastic concept, but it falls over if you have a project with an input device. When the program comes to the input instruction, it does not carry out a decision according to the condition of the input line. You have to physically change the program to reflect the new condition.
The second biggest problem with a software single-stepper is a delay routine. These can consist of 100,000 or more steps and will take an inordinate length of time to process at single-step rate. When you come to a delay in your program, simply press the R/C button and the oscillator will clock the chip at the setting of the potentiometer. This can be from a few hundred Hz to about 4MHz and the micro will zip through the delay routine on the project-under-test. It is not easy to determine when the delay routine is about to finish but you can add an extra routine to turn on an output, at the end of the delay routine.
A reset button on the Pseudo ’508A module allows the program to be reset without having to turn off the power.
The Pseudo ’508A module is not an “In-Circuit” Programmer. You need to take the chip out of the socket and burn it in the Multi-Chip Programmer or 5x7 Display.

You now have all the tools needed to carry out development work.


The 508A chip generates the 3 clock frequencies. 
The PIC16F84 holds the program "you are working on"

THE CIRCUIT
The circuit for the Pseudo ‘508A is shown above. The three clock frequencies for the Project-Under-Development are generated by the components around the 8-pin chip. The basis of this module could be any chip containing gates but we could not get any other 8-pin chip to do the job. In addition, it would require a lot of surrounding components to generate the features we need. The answer was to use a PIC12c508A.
It contains two programs: The “STEP” program, made up of a single step feature, then a 10Hz repeat after 2 seconds and a program that produces a variable output frequency according to the position of the 50k pot.
The program is constantly looping the two switches and when ST button is pressed, it outputs a clean pulse to the PICF84, via a gating diode. This will advance your program one step (one instruction) and you can see exactly what is happening after each instruction is executed. It’s absolutely fascinating to see a program going through each step and if the button is kept down, 10 instructions per second are executed.
If the RC button is pressed, the program in the ‘508A outputs a low on GP1 and looks to see when GP1 is HIGH. When it is HIGH, it outputs a pulse to the F84 via pin 5. If the pot is turned clockwise, it will have a lower value of resistance and the capacitor in the TIME DELAY circuit will charge at a faster rate. This will be detected by the ’508A and the output pulses will increase.
If the XT button is pressed, the crystal will be connected to the PICF84 and your program will run at crystal frequency.

The Reset switch resets the PICF84 without having to turn off the power. The power for the Pseudo ’508A module comes from the project you are developing.

Building the Pseudo ‘508A
All the components fit onto the PC board as shown on the overlay.
A length of ribbon cable is connected to the 8 holes at the edge of the board and the other end is soldered to an 8-pin IC socket. The wires are soldered to the top of the socket and you must be very quick with soldering to prevent the socket melting. Make sure you use an 8-pin IC socket with straight pins (some sockets have bent pins to allow the socket to hold onto the board when inserted). These pins will also damage the socket on your project.

Two chips are needed. A ‘508A with oscillator routines and a PIC16F84 with your program.

The program in the ’508A will have to be “burnt” on the Multi-Chip Programmer and this will give you the first opportunity to burn this type of microcontroller.

Using the Pseudo ‘508A Module
You will need these things:
1. The 508A project you are developing, such as on the 12C508A 6v Express module, or one of our ’508A projects.
2. The Pseudo 508A module,
3. A blank PIC16F84 chip,
5. Notepad or Text Pad, for writing your program,
4. Multi-Chip Programmer or 5x7 Display for burning the chip,
6. IC-PROG software - the program that runs the burn routine.

The project you are developing can be a prototype or one of the projects described in this book. The only requirement is it must have an 8-pin IC socket for a PIC12c508A.

Place the project you are developing on the workbench and connect the supply. It should have a switch so that power can be turned on and off when needed.
Place the Pseudo ’508A module on the bench and plug the 8-pin plug on ribbon cable (it is actually an 8-pin IC socket) into the socket on your project.
Burn a program into a PIC16F84 and fit it into the socket on the Pseudo 508A module. Switch on the power and your project should run exactly like a 508A project. If it doesn’t, we have provided all the tools you need for locating the fault.

PSEUDO ‘508A
PARTS LIST

2 - 1k
6 - 2k2
2 - 10k
1 - 50k mini pot with shaft
2 - 15p ceramics
1 - 1n ceramic
1 - 100n monoblock (ceramic)
1 - 1N 4148 signal diode
6 - 3mm red LEDs
1 - 4MHz crystal
3 - tactile push switches
1 - tactile reset switch
1 - 20cm ribbon cable 8-way
1 - 8 pin IC socket
1 - 8 pin IC socket straight-pins!
1 - 18 pin IC socket
1 - PIC12c508A (blank)
1 - PIC16F84 (blank)

1 - Pseudo ‘508A PC board


NEXT