Microchip Technology DM164130-7 User Manual

Page of 42
F1 Evaluation Platform User’s Guide
DS41401B-page 26
 2010 Microchip Technology Inc.
5.7.3
LCD Segment Definitions
FIGURE 5-10:
LCD DISPLAY
There are many segments present on the F1 Evaluation Platform LCD. To access 
these segments, simply set the supplied #defines to ‘1’ or ‘0’.
FIGURE 5-11:
5.8
USING THE RTCC DRIVER
The RTC driver simply keeps track of seconds. The power-up initial value is ‘0’, 
however a function (rtcc_set) is provided to change that value. To keep the seconds 
up-to-date, the function, rtcc_handler, must be called more frequently than the 
defined value of CLOCKS_PER_SECOND. There are two options for the RTCC driver. 
The first option is to use the Timer1 counter to provide a 1 Hz interrupt 
(CLOCKS_PER_SECOND = 1). The second option is to use the LCD write-allowed 
interrupt flag to provide a 128 Hz event (CLOCKS_PER_SECOND = 128). The two 
choices are selected by defining use_lcdif or undefining use_lcdif. 
5.8.1
RTCC Function Interface
5.8.1.1
rtcc_init
Intialize the RTCC function including Timer1, if required.
void display_volts(int v)
{
  display_int(v);
  DP3 = 0;
  DP2 = 0;
  S1 = 0;
  S2 = 0;
  AMPS = 0;
  VOLT = 1;
  KILO = 0;
  OHMS = 0;
  if (v < 0)
MINUS = 1;
  else
    MINUS = 0;
}