Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Finishing Touches

<^< Using the ADC | Course Index | Introduction to PICmicro Projects >^>

Your system is nearly complete.

  1. In the Main routine drag a Macro icon into the loop. In this icon call the 'ADCmeasure' macro.

Your project is now quite functional. If you simulate it then you should see that when you click on a channel button the LCD displays the channel number. When you move the Volume dial you should see the volume displayed. Of course there are some bits missing: you have not developed the hardware and software to connect to a radio system to actually alter the channel, and you have not made any use of the volume variable to alter the amplification of the output stage of your Hi-Fi. However you have completed a significant part of the overall design project.

The following image shows the entire project. Hopefully in this section you have learned that it is really useful to break the stages of your development down into several individual programs - each in its own macro. This allows you to build and test one part of the program at a time. This also makes your main program very easy to read - although in this case readability is compromised slightly by the use of interrupts: it is not immediately obvious to someone who has not written the program how the 'Chandet' macro is called, although the two interrupt macro icons in the main program do give a clue.

<^< Using the ADC | Course index | Introduction to PICmicro Projects >^>

Print - Search - Login

Page last modified on May 03, 2013, at 03:45 PM