Hardware Prototyping:Dizi84 Applications

Dizi84 Applications

Titles for a set of programs to run on this hardware are suggested below. Three applications (*) will be described in some detail, while a further eight will be specified and the source code listed. These form a set of applications suitable for group assignment work in a training program.

PIC Microcontrollers-1264

PIC Microcontrollers-1265

An ISIS schematic for the DIZI board is shown in Figure 10.12, which allows the above applications to be tested by simulation. All can be downloaded from the support website (www.picmicros.org.uk), and tested in MPLAB if Proteus VSM is not available. If VSM is available, virtual instruments can be used for checking the outputs. The frequency counter and oscilloscope are shown in Figure 10.13.

PIC Microcontrollers-1266

PIC Microcontrollers-1267PIC Microcontrollers-1268

A flowchart for the program BUZZ1 is shown in Figure 10.14. It will generate a single tone at the buzzer when the input button is operated, by toggling the output to the buzzer, with a delay between each change of output state. If a count of 255 is used with a 1 ms instruction cycle time, we have seen that the loop itself will take 255 x 3 x 1 ¼ 765 ms, which will give an output frequency of 106/(765 x 2) ¼ 654 Hz, which is well within the audible range.

This frequency can be adjusted by simply reducing the count value in the delay loop; 654 Hz is the minimum frequency available. A more precise calculation of the delay loop can be used to obtain a more exact frequency, or the hardware timer can be used. In either case, the period can be checked using the stopwatch in the simulator before downloading. The source code is listed in Program 10.1.

Leave a comment

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