Atmel Xplained Evaluation Board ATXMEGAA3BU-XPLD ATXMEGAA3BU-XPLD データシート

製品コード
ATXMEGAA3BU-XPLD
ページ / 15
 
AVR1934 
8413A-AVR-09/11 
2.5 Battery backed Real Time Counter 
The Atmel AVR XMEGA-A3BU features battery backup system support, which can be 
used to power an ultra low-power 32-bit Real Time Counter (RTC), and a 32.768kHz 
crystal oscillator, providing a 1Hz clock to the RTC. On the XMEGA A3BU Xplained 
board the RTC is powered by a button cell battery. 
The battery is connected to the battery backup systems V
BAT
 pin, ensuring power to 
the RTC when the main power is disconnected, allowing the storage of current time 
on the board. Typical power consumption with the RTC running is 500nA. 
During production of the XMEGA-A3BU Xplained board, the production time is stored 
in the user signature row, and the RTC is initialized to the current time in UTC 
(Coordinated Universal Time), allowing the demo application to show the time relative 
to the time zone, and time elapsed since production.  
2.5.1 Usage in demo application 
The data from the RTC is used in the calculation of current date and time in the 
Date/Time and Production date applications. This is done by interfacing the XMEGA 
RTC32 driver (
rtc32.c
 and 
rtc32.h
), and reading the counter register.  
The main demo application verifies that the RTC is not running on battery power 
before trying to initialize it. If the V
BAT
 system check fails, the RTC is not running, and 
must be reinitialized. The applications will also try to verify that the RTC has not been 
reset by comparing it to the production time stored in the user signature row. If by 
chance the RTC register is cleared, such as when the backup battery is removed, the 
current time will be reset to whichever is later, one second after the production time 
stored in the user signature row, or 01.01.2011 00:00:00 UTC, allowing for correct 
operation of the demo application. 
2.6 Monochrome Graphics System (gfx_mono) 
The monochrome graphics library gfx_mono provides functions for a high level 
interface for drawing primitives, pixel manipulation and writing text to LCD panels. In 
this configuration, it is set up to interface the ST7565R LCD controller, which in turn 
interfaces the C12832_A1Z LCD panel. It is created so that it provides a complete 
abstraction layer on top of the LCD controller interface, allowing for easy porting to 
other LCD controllers and panels. All ST7565R and C12832_A1Z specific functions 
are located in 
gfx_mono_c12832_a1z.c
 and 
gfx_mono_c12832_a1z.h
.  
The library allows for drawing and filling of primitives (lines, rectangles, circles) using 
gfx_mono_generic.h
, and text printing using 
gfx_mono_text.c
 and 
gfx_mono_text.h
. The former also allows drawing of bitmaps to the graphic memory. 
The library supports writing to a frame buffer for easy manipulation of pixel data, in 
case the LCD does not support pixel data reads. As the LCD controller serial interface 
chosen for this board does not allow for reading of pixel data, a frame buffer is 
utilized. 
2.6.1 Primitives drawing  
The library allows drawing of certain primitives, such as lines, rectangles and circles, 
defined in gfx_mono_generic.h. These functions are used in the demo applications 
menu system, and button splash screen. The drawing of primitives is handled by the 
library, but there is also support for hardware based primitives, given support for this 
in the controller. Primitives are handled by the library on this board.