Microchip Technology DV164136 User Manual
PICDEM™ PIC18 Explorer Demonstration Board User’s Guide
DS51721B-page 24
© 2008 Microchip Technology Inc.
3. Clock
Once this mode is entered from the main menu, a Real-Time Clock (RTC) will start
counting from 00:00:00. The Timer1 module uses a 32-kHz clock crystal to establish
the clock.
counting from 00:00:00. The Timer1 module uses a 32-kHz clock crystal to establish
the clock.
The program also sends the time data to the RS-232 serial port using the Universal
Asynchronous Receiver Transmitter (UART) on the microcontroller. This enables the
host PC to display the LCD’s data using the Hyper Terminal application on the PC.
Asynchronous Receiver Transmitter (UART) on the microcontroller. This enables the
host PC to display the LCD’s data using the Hyper Terminal application on the PC.
If using the Hyper Terminal application, use the settings given in Table 3-1.
To set the clock time:
1.
Enter the clock-setting program by pressing RB0. The clock begins running.
2.
To set the hours value, press RA5.
3.
Increment the hours to the desired value by pressing RB0.
4.
To set the minutes value, press RA5.
5.
Increment the minutes to the desired value by pressing RB0.
6.
To start the clock with the set time, press RA5. The LCD returns to an active clock
display.
display.
7.
To return to the main menu, press RB0.
Note:
For information on connecting the board’s RS-232 serial port to the PC, see
Section 2.5 “Connecting to Host PC for RS-232 Communication”.
Section 2.5 “Connecting to Host PC for RS-232 Communication”.
TABLE 3-1:
HYPER TERMINAL SETTINGS
Field
Setting
Bits per second
9600
Data bits
8
Parity
None
Stop bits
1
Flow control
None