Chapter 3. Explorer 16 Tutorial Programs
3.1
INTRODUCTION
This chapter provides a high-level overview of the PIC24 and dsPIC33F firmware
programmed during the tutorial exercise in the previous chapter.
3.2
PIC24 TUTORIAL PROGRAM OPERATION
The PIC24 tutorial program is made up of three components which are individually
displayed on the LCD. The program is used to demonstrate the new Parallel Master
Port (PMP) module which is used to drive the LCD, as well as the new Real-Time
Clock/Calendar module (RTCC). The program flow is shown in Figure 3-1.
3.2.1
Features mode displays a continuous description of the PIC24FJ128GA010 device
feature set. To exit the display and continue to the next mode, press S4.
3.2.2
Voltmeter/Temperature mode uses the code modules, vbanner.c and ADC.c, and
the A/D module to measure analog signals from the board and convert them for display
on the LCD. The voltage is taken from the potentiometer (R6) and displays a voltage
between 0.00V and 3.29V on line 1 of the LCD. Temperature is from a TC1074A analog
thermal sensor (U5). The temperature is displayed on line 2 of the LCD and auto-
matically alternates between Celsius and Fahrenheit values. The voltage and
temperature are updated continuously.
This mode also lets users store the current temperature in the on-board serial
EEPROM by pressing S5. Pressing S6 switches the display between current and
stored temperature values. An 'M' on the right side of the LCD indicates that a stored
temperature value is being displayed.
To exit and continue to the next mode, press S4.
3.2.3
Clock/Calendar mode uses code in the modules, rtcc.c and tbanner.c. Once this
mode is entered from the main menu, a Real-Time Clock will start counting from
10:00:00, and display the date and day for Oct. 10, 2005. The new RTCC module and
a 32 kHz clock crystal are used to provide the Real-Time Clock with day/date calendar.
In Clock/Calendar mode, the user-defined push buttons do the following:
• S3 toggles the Clock Set mode, which allows the user to set the date and time.
Setup mode starts with the tens digit of the hour in the time display.
• S4 accepts the value of the current item and moves cursor to the next item.
• S5 decrements the currently selected item.
• S6 increments the currently selected item.
Pressing S3 once superimposes a flashing cursor over the tens digit of the hour in the
time display. Each press of S4 moves the cursor sequentially through the digits of the
time display, then the month, day and year. Pressing S3 at any time in the process
returns to the regular clock/calendar display.
© 2005 Microchip Technology Inc.
EXPLORER 16 DEVELOPMENT
PIC24 Features
Voltmeter/Temperature
Clock/Calendar
BOARD USER'S GUIDE
DS51589A-page 23
Need help?
Do you have a question about the Explorer 16 and is the answer not in the manual?
Questions and answers