OP7100
54 Software
The sample program
OP71.C
below cycles through through the outputs
with one bit high at a time while it displays the state of the digital inputs.
Real-Time Clock (RTC)
The OP7100 has an Epson 72423 chip. The chip stores time and date, and
accounts for the number of days in a month, and for leap year. A backup
battery will allow the values in the RTC to be preserved if a power failure
occurs.
The Dynamic C function library
DRIVERS.LIB
provides the following
RTC functions.
The
Dynamic C Function Reference
manual describes these
functions and the associated data structure
tm
.
•
tm_rd
Reads time and date values from the RTC.
•
tm_wr
Writes time and date values into the RTC.
The following points apply when using the RTC.
1. The AM/PM bit is 0 for AM, 1 for PM. The RTC also has a 24-hour
mode.
2. Set the year to 96 for 1996, 97 for 1997, and so on.
Constantly reading the RTC in a tight loop will result in a loss
of accuracy.
OP71.C
void delay( unsigned wDelay ){
for(;--wDelay;hitwd());
}
void main( void ){
unsigned wAddr;
for (;;)
for(wAddr=0x4140;wAddr<+wAddr){
outport( wAddr,0x01 );
printf( "%04x%02x\n",wAddr,inport(0x4140) );
delay( 0x8000 );
outport( wAddr,0x00 );
}
}
Содержание OP7100
Страница 1: ...OP7100 Serial Graphic Display User s Manual 019 0065 070831 O ...
Страница 10: ...OP7100 x About This Manual ...
Страница 16: ...OP7100 16 Overview ...
Страница 51: ...OP7100 Software 51 CHAPTER 4 SOFTWARE Chapter 4 describes the Dynamic C functions used with the OP7100 ...
Страница 74: ...OP7100 74 Software ...
Страница 82: ...OP7100 82 Graphics Programming ...
Страница 88: ...OP7100 88 Installation ...
Страница 98: ...OP7100 98 Specifications ...
Страница 108: ...OP7100 108 Memory I O Map and Interrupt Vectors ...
Страница 112: ...112 Serial Interface Board 2 OP7100 ...
Страница 113: ...OP7100 Backup Battery 113 APPENDIX E BACKUP BATTERY ...
Страница 116: ...OP7100 116 Backup Battery ...
Страница 124: ...OP7100 124 Index ...
Страница 126: ...XX0000 Schematics ...