Electronic Components Datasheet Search |
|
AN1216 Datasheet(PDF) 6 Page - STMicroelectronics |
|
AN1216 Datasheet(HTML) 6 Page - STMicroelectronics |
6 / 11 page AN1216 6/11 DocID007016 Rev 2 /* AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE */ /* PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, */ /* REPAIR OR CORRECTION. */ /*********************************************************************************/ /****************************************************************/ /* */ /* This program controls the TIMEKEEPER alarm hardware so */ /* as to provide the functionality of a periodic alarm. */ /* */ /****************************************************************/ #include <mcu_hc11.h> // this was developed on HC11 platform #include <m88xxfx.h> // M88 Flash+PSD register map extern volatile unsigned char dip_sw; /*********************************************************************/ /* TIMEKEEPER memory map */ /* Depend on your system and your TIMEKEEPER. */ /* The device is M48T37V/Y series, 32kx8 non volatile SRAM, 16 clock */ /* alarm registers in address 7FF8h to 7FFFh */ /* In this example, the TIMEKEEPER was mapped from 2000h to 9FFFh */ /*********************************************************************/ /* #ifndef _MEM_MAP_H #define _MEM_MAP_H #define EXT_RAM_BASE (unsigned int) 0x2000 #define TIMEKEEPER_HOUR (unsigned char *) 0x9FFB #define TIMEKEEPER_MIN (unsigned char *) 0x9FFA #define TIMEKEEPER_SEC (unsigned char *) 0x9FF9 #define TIMEKEEPER_CAL (unsigned char *) 0x9FF8 #define TKPER_AL_IT (unsigned char *) 0x9FF6 #define TKPER_AL_DATE (unsigned char *) 0x9FF5 #define TKPER_AL_HOUR (unsigned char *) 0x9FF4 #define TKPER_AL_MIN (unsigned char *) 0x9FF3 #define TKPER_AL_SEC (unsigned char *) 0x9FF2 #define TKPER_FLAG (unsigned char *) 0x9FF0 #endif */ /**************************************************************************/ /* function Char_To_Int */ /* description : This function convert the timekeeper data*/ /* (in BCD format) to an integer. */ /* input : char byte */ /* output : integer */ /* example : octet = 0x33 (51 in integer) */ /* Char_To_Int = 33 (0x21 in hexa) */ /**************************************************************************/ int Char_To_Int(unsigned char octet) { int buffer; buffer = (int)(octet); if (octet <= 0x09) return(buffer); if ((octet >= 0x10) & (octet <= 0x19)) return (buffer-6); if ((octet >= 0x20) & (octet <= 0x29)) return (buffer-12); if ((octet >= 0x30) & (octet <= 0x39)) return (buffer-18); |
Similar Part No. - AN1216 |
|
Similar Description - AN1216 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |