Hardware Prototyping:Dizi84 Board Design

Dizi84 Board Design

A circuit will now be designed, and a set of programs provided, to illustrate the hardware design process and programming principles discussed in previous sections. The DIZI board will allow the user to experiment with the various features of the PIC hardware and programming techniques.

Hardware Specification

The microcontroller demonstration board will be suitable for demonstrating a range of processes incorporating display, audio, counting, timing and interrupt operations. The

PIC Microcontrollers-1259

board will have a single-digit seven-segment display for showing output data in hexadecimal or decimal form, and a low-power audio transducer. Manually operated toggle switches will provide a 4-bit parallel input. Two input push buttons will be used for general control (e.g. run, clear), to simulate input events to be counted, or to generate an external interrupt. Timed events should be measured or generated with an accuracy of better than 1%. The circuit will be battery powered, with a push button power switch to ensure that the power cannot be left on, and a power ‘on’ indicator. The board will be as small as possible, and the microcontroller must be easily reprogrammable, with flash memory.

Hardware Implementation

The seven-segment display will require seven outputs from the microcontroller. Active high operation can be provided by a common cathode LED display, and the display decimal point can be used as the power indicator. The audio transducer requires one output. A piezo buzzer has sufficient bandwidth and output power, and its power consumption is low. A miniature DIP switch bank will be used for 4-bit input, and miniature push buttons used, to conserve space.

Fourteen input/output (I/O) pins are required; the PIC 16F84A has only 13, so a chip with more I/O, such as the 16F690, could be considered. However, the audio output and interrupt input can share the same I/O pin, because the high impedance of the buzzer will not interfere with input signals on the same pin. RB0 will be used as the dual function pin, since it is defined as the principal interrupt input, but can also be used as an output. The outputs can source up to 25 mA, but current-limiting resistors will restrict the current per display segment to 10e15 mA to control the maximum load on the port when all the segments are on. The I/O allocation for the project is shown in Table 10.1.

A crystal clock of 4 MHz will be used to obtain the required timing precision, and the convenience of a 1 ms instruction cycle. The 16LF84A-04 (LF ¼ low voltage) can operate from a supply of between 2.0 V and 5.5 V, so the circuit will be powered from 2 x 1.5 V dry cells, giving a 3.0 V supply. The ‘04’ suffix indicates that a maximum 4 MHz clock frequency can be used. A block diagram of the proposed system is shown in Figure 10.8. The inputs and outputs are given the labels that will be assigned in the application programs.

Implementation

A circuit for the DIZI board is shown in Figure 10.9. The PIC 16LF84A drives an active high- (common cathode)elow-current seven-segment LED display at port B, RB1eRB7, via a block of 220R current-limiting resistors. RB0 drives an audio sounder when set as

PIC Microcontrollers-1260

PIC Microcontrollers-1261

an output, but can also be used to detect the ‘Interrupt’ push button when set as an input and the chip is initialized for this option. To prevent RB0 being shorted to ground if set as an output, the spare 220R resistor is connected between the push button and RB0.

This does not affect the operation of the sounder, which has a relatively high resistance. A 4-bit DIP switch input is connected to port A, RA0eRA3, with a push button connected to RA4, which can be used as an external pulse input to the Counter/Timer Register TMR0. These operate as active low inputs with 100k pull-up resistors, as does the interrupt push button.

A stripboard layout for the DIZI board is shown in Figure 10.10. The detail of the component pin connections has been omitted owing to the reduced scale of the illustration, but this information can be obtained from the component pin out data, when selecting particular components. The finished stripboard circuit is shown in Figure 10.11. The

PIC Microcontrollers-1262

PIC Microcontrollers-1263

construction process for a slightly modified board is described in a little more detail in Appendix D.

Leave a comment

Your email address will not be published. Required fields are marked *