http://www.www.datasheet4u.com

900,000+ Datasheet PDF Search and Download

Datasheet4U offers most rated semiconductors datasheets pdf




  Microchip Technology Semiconductor Electronic Components Datasheet  

AN1355 Datasheet

A Complete Electronic Watch Based on MCP79410 I2C RTCC

No Preview Available !

AN1355 pdf
AN1355
A Complete Electronic Watch Based on MCP79410
I2C™ RTCC
Author: Alexandru Valeanu
Microchip Technology Inc.
INTRODUCTION
An increasing number of applications that involve
time measurement are requiring a Real-Time Clock/
Calendar (RTCC) device. The MCP79410 is a fea-
ture-rich RTCC that incorporates EEPROM, SRAM,
unique ID and time-stamp.
FEATURES OF THE RTCC
STRUCTURE
• I2C™ Bus Interface
• RTCC with Time/Date Registers: Year, Month,
Date, Day of Week, Hours, Minutes, Seconds
• Support for Leap Year
• Low-power CMOS Technology
• Input for External Battery Backup (maintains
SRAM, RTCC and Timekeeping)
• On-board 32,768 kHz Crystal Oscillator for the
RTCC
• On-chip Digital Trimming/Calibration of the
Oscillator
• Operates down to 1.3V VBAT Minimum
• Operating Temperature Range:
- Industrial (I): -40C to +85C
• Multi-function Pin:
- Open-drain configuration
- Programmable clock frequency out
- Programmable alarm output
• Interrupt Capability (based on the 2 sets of Alarm
Registers, ALM0 and ALM1)
• Time-stamp Registers for holding the Time/Date
of Crossing:
- from VDD to VBAT
- from VBAT to VDD
SCHEMATIC
The schematic includes a PIC18 Explorer demo board
and the I2C RTCC PICtail™ daughter board as shown
in Figure 1.
FIGURE 1:
SCHEMATIC
LCD
LUMEX
DB7 - 0
RS
E
MCP23S17
SPI
Expander
SCK
CS
SDI
C4 = 0.1 uF
C3 32.768 kHz
1 X1
10pF
Y
C4
R4
BAT 85 1K
BAT
2 X2
3 VBAT
100pF
4 VSS
RTCC
MCP 79410
VDD 8
MFP 7
SCL 6
SDA 5
VDD
2K
VDD
2K
2K VDD
RC5/SD01
RA2
RA4/T0 CKI
PIC18F87J11
RC3/SCK1/SCL1
RC4/SDA1
RB0
RA5
VDD
10K
S1
VDD
10K
MENU KEY
S2
INCR KEY
2010 Microchip Technology Inc.
DS01355A-page 1
Free Datasheet http://www.Datasheet4U.com


  Microchip Technology Semiconductor Electronic Components Datasheet  

AN1355 Datasheet

A Complete Electronic Watch Based on MCP79410 I2C RTCC

No Preview Available !

AN1355 pdf
AN1355
The resources used on the demo board are:
• LCD
• 2 push buttons
• AC164140 RTCC PICtail daughter board
To access the LCD through a minimum of pins, the SPI
on the MSSP1 module is used, in conjunction with a
16-bit I/O expander with SPI interface (MCP23S17).
The two on-board push buttons are S1 and S2,
connected to RB0, RA5 GPIOs. The I2C RTCC is part
of the RTCC PICtail evaluation board and is directly
connected to the MSSP1 module of the MCU. Another
necessary connection is between the MFP signal of the
RTCC and RA4 (T0CKI), the clock input of TMR0. The
RTCC is programmed to offer a square wave of 1Hz on
MFP. TMR0 is programmed as the counter and is initial-
ized at 0xFFFF, in order to give a software interrupt at
every second. All connections between the I2C RTCC
and the MCU (SDA, SCL, MFP) are open drain and use
pull-up resistors. The RTCC PICtail daughter board
has two other components:
• a 32,768 Hz crystal driving the internal clock of
the RTCC
• a 3-volt battery sustaining the RTCC when VDD is
not present on the demo board
DETAILS ABOUT IMPLEMENTATION
The application is performed on a PIC18 Explorer
demo board on which is mounted a PIC18F87J11
MCU. The code is written in ‘C’ using the C18 compiler.
It implements an electronic watch (based on the
MCP79410 RTCC), displaying the six basic time/date
variables on the on-board LCD. It includes a setup
sequence, which sets the same six time/date variables,
using the two push buttons of the evaluation board (S1
= MENU KEY, S2 = INCREMENT KEY).
FUNCTIONAL DESCRIPTION
The MCP79410 is an I2C slave device, working on the
related bidirectional 2-wire bus. SDA is a bidirectional
pin used to transfer addresses and data in and out of
the device. It is an open-drain terminal, therefore, the
SDA bus requires a pull-up resistor to VCC (typically
10kfor 100 kHz and 2kfor 400 kHz). For normal
data transfers, SDA is allowed to change only during
SCL low. Changes during SCL high are reserved for
indicating the Start and Stop conditions. SCL input is
used to synchronize the data transfer from and to the
device. The related internal structures have the
following device addresses/control bytes (the RTCC is
included in the SRAM bank):
• RTCC + SRAM: 0xDE for writes, 0xDF for reads
• EEPROM: 0xAE for writes, 0xAF for reads
The chip can support speeds up to:
• 400 kHz 2.5 to 5V
• 100 kHz 1.8 to 2.5V
DS01355A-page 2
APPLICATION DESCRIPTION
The application performs an electronic watch that has
two main functions:
• display of the six time/date variables (year, month,
date, hour, minutes, seconds) using the interrupts
of the microcontroller (this operation is performed
on the on-board LCD; the format is 24 hours).
• setup of the above variables using the two on-
board push buttons: S1 = MENU KEY, S2 =
INCREMENT KEY. The real-time display of the
time/date variables is performed as long as the
MENU KEY (S1) is not pressed (the action of the
INCREMENT KEY (S2) has no effect on the
watch continuously displaying the time and the
date).
Pressing the MENU KEY will start the setup menu,
disabling the interrupts. The menu is covered once in
the following order: year, month, date, hour, minutes,
and seconds. Going from one variable to another is
performed through the MENU KEY, and incrementing a
variable is performed through the INCREMENT KEY.
The last action of the MENU KEY exits the setup menu.
Accordingly, to correct a possible setup error, the setup
menu must be re-entered. The upper limits of every
variable are: year = (20) 99; month = 12; date =
(always) 31; hour = 23 (24 hours format); minutes = 59;
seconds = 59. Entering the setup menu will not stop the
oscillator of the RTCC. At the end of the setup, the time/
date variables are updated and entering the menu will
stop the counting. If the user enters the Time Setup
mode, all changes are written to the RTCC, even if no
variables are changed. When entering the menu the
watch will resume counting from the point where it was
stopped.
FIRMWARE DESCRIPTION
Drivers
Drivers are divided into 4 classes:
• LCD drivers
• RTCC register access drivers
• Drivers related to the operating system (setup
menu): keyboard drivers
• Interrupt system drivers (the interrupt function
based on TMR0’s overflow and the related func-
tions (interrupt initialization, start/stop interrupts)
2010 Microchip Technology Inc.
Free Datasheet http://www.Datasheet4U.com


Part Number AN1355
Description A Complete Electronic Watch Based on MCP79410 I2C RTCC
Maker Microchip
Total Page 8 Pages
PDF Download
AN1355 pdf
Download PDF File


Buy Electronic Components




Related Datasheet

1 AN135 Sensor Circuits and Digitally Controlled Potentiometers Xicor
Xicor
AN135 pdf
2 AN1355 A Complete Electronic Watch Based on MCP79410 I2C RTCC Microchip
Microchip
AN1355 pdf
3 AN1358 Dual Operational Amplifiers Panasonic Semiconductor
Panasonic Semiconductor
AN1358 pdf
4 AN1358S Dual Operational Amplifiers Panasonic Semiconductor
Panasonic Semiconductor
AN1358S pdf






Part Number Start With

0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    P    Q    R    S    T    U    V    W    X    Y    Z

site map

webmaste! click here

contact us

Buy Components