Find your password

Datasheets : PIC Microcontrollers - Process Unit

What does it do?

PIC microcontrollers are general purpose programmable process units.

How do they operate?

PIC microcontrollers are ‘computers on a chip’. They can replace the large number of fixed-function integrated circuits, such as CMOS ICs.

The way in which a PIC microcontroller behaves is controlled by a program. Depending on the program, a PIC can behave like combinations of gates, timers, counters, latches etc., as well as perform other functions that would be very complicated using ‘hard-wired’ logic.

The section on Software Engineering on this web site gives details of PIC programming.

This data sheet gives outline information relevant to PICs used in schools.

Selecting a suitable PIC

There is a potentially bewildering range of PICs available. In practice the selection process is not as complicated as it looks.

  • First, decide on the PIC programming system that you will use. The Pedagogy section of this web site discusses some of the options. As is clear from the table below, once the PIC programming system is selected, this reduces the choice of PICs dramatically.
  • One factor that may well influence the choice of PIC programming system is whether or not it allows in-circuit programming. In-circuit programming means that the PIC can be programmed from the computer without removing it from the circuit. PICs that are not programmed in-circuit have to be placed in a special programmer (which adds to costs) and then transferred to the circuit (with a good chance of being damaged in the process). PICAXE, EChip and SOLO use pre-prepared PICs. ICON software can program PICs in-circuit that have not been pre-prepared, using a special adaptor.
  • Next, decide on the size of PIC needed. PICs come with different numbers of pins: 8, 14, 18, 28 and 40. The more pins a PIC has the more input sensors and output devices that can be used with it. However, the larger the PIC, the more expensive it is and the more complicated the PCB will be. Make sure that the number of input and output pins available is enough for the planned application. Generally speaking, low cost 8-pin PICs are suitable for most work at KS3 and quite a lot of work at KS4. Some GCSE projects will need 18 pin PICs and a few may need 28 pin PICs.
  • Older PICs used an external oscillator. More modern PICs have an internal oscillator and therefore have a simpler PCB. An external oscillator is necessary if the timing accuracy needs to be better than 1%.
  • If analogue sensors are being used then a PIC with a built-in Analogue to Digital Converter (A to D) is needed.
  • Linking a PIC to some input and output devices e.g. Piezo transducers, liquid crystal displays, servo motors, is only possible with a limited range of PICS and PIC programming systems.
  • By this stage the choice should be limited to a small number of PICs. The final issue to consider is the amount of memory the PIC will need to store the program. It is not possible to know the amount of memory needed until the program has been written. However, it is usually possible to select a group of PICs which are very similar and that only differ in the amount of memory they have. In this way, all the earlier stages of development (designing the PCB, writing the program) can be done and the final selection of PIC left to a late stage. Generally speaking, the more memory a PIC has the more expensive it is.

Once the PIC is selected it is important to be aware of the supply voltage needed. It is convenient, where possible, to use the same power supply for all the electronic subsystems. Most PICs can provide an output current of 25mA per pin, but some have a lower limit. PICs are therefore able to drive some low to medium power devices, such as piezo transducers, some LEDs and some buzzers, without the need for a driver.

PICs available

Notes

  • Circuit information depends on the type of PIC. For details see suppliers’ web sites listed below.
  • To reduce electrical noise (which can cause a PIC to ‘crash’) place a small capacitor, such as a 100nF polyester, across the power supply rails, as close as possible to the PIC.
  • The maximum current an output pin of a PIC can supply is 25mA. In the case of some PICs there is a limit of 100mA on the total current that can be supplied from all 8 output pins – limiting the average current per pin to 12.5mA in these cases. Some output devices that require modest current (LEDS, piezo transducers, some buzzers) can therefore be driven directly by PICs. If an output device needs more current than the PIC can supply then a driver needs to be added.
  • All PICAXE microcontrollers will run with a power supply in the range 3 to 5.5V d.c. after they have been programmed. However, a power supply of 4.5 – 5.5V should be used to ensure that the program downloads reliably from the computer.
  • The TEP Phone PIC Programmer uses the 16F84 PIC, but these need to have been pre-programmed by MUTR.

Possible applications

  • PICs can be used in place of one or more ‘process’ ICs.

Making

Use a Dual In Line (DIL) socket for the PIC. Before inserting the PIC, connect the power supply and use a voltmeter to check that:

  • the voltage on the 0V terminal is low;
  • the voltage on the +V terminal is high;
  • the voltage on the input pins goes high and low in response to the units that provide the input signals.

Insert the PIC the right way round.

Testing

Solder in place the components needed for just one output device. Write a short test program that pulses this output device on and off. When you are sure this is working properly, add and test each output device in this way one at a time.

When all the output devices are working, solder in place the components for one input sensor. Write a short test program that turns one of the output devices on and off when the signal from this input device is high or low. When you are sure the input sensor is working properly, add and test each input sensor one at a time.

Fault finding

If there is a fault, check that:

  • the voltage on the 0V pin is low;
  • the voltage on the +V pin is high.

If there is a fault, check the tracks and solder joints.

Alternatives

  • Separate ‘hardwired’ ICs can be used. This can be a cheaper solution if the circuit is very simple but it is not possible to modify the way the system works after it has been made.

Web links

Suppliers (many of these websites include information about the relevant PICs plus circuit and PCB information):

Further circuits and PCB information:

Return to list of datasheets

Go to Top
These are the details: