Electronic Components Datasheet Search |
|
AN1216 Datasheet(PDF) 4 Page - STMicroelectronics |
|
AN1216 Datasheet(HTML) 4 Page - STMicroelectronics |
4 / 11 page AN1216 4/11 DocID007016 Rev 2 For example, to set a period of 1 hour 49 minutes 35 seconds, the procedure is as follows: RPT4 = 1 RPT3 = RPT2 = RPT1 = 0 alarm_second = 0x35 alarm_minute = 0x49 alarm_hour = 0x01 Or, to set a period of 49 minutes 35 seconds, the procedure is as follows: RPT4 = RPT3 = 1 RPT2 = RPT1 = 0 alarm_second = 0x35 alarm_minute = 0x49 alarm_hour = Don’t care Software implementation TIMEKEEPER® data format TIMEKEEPER data is held as BCD (binary coded decimal). This is handled in the C programming language using the ‘unsigned char’ data type. This can be converted within the C program to other data types, such as ‘integer’, for numeric processing. Two functions are provided in the program at the end of this document for making this conversion. Char_To_Int: to take a BCD parameter, and to return the equivalent integer value Int_To_Char: to take an integer parameter, and to return the equivalent BCD value. The valid ranges for the alarm fields are summarized in Table 4. Table 3. Bit setting to control the period of the repeated alarm RPT4 RPT3 RPT2 RPT1 Periodic alarm activated every 1111 1 second 1 1 1 0 alarm_second seconds (less than 1 minute) 1 1 0 0 alarm_minute minutes alarm_second seconds (less than 1 hour) 1 0 0 0 alarm_hour hours alarm_minute minutes alarm_second seconds (less than 1 day) Table 4. TIMEKEEPER® data format Data C language type Int (integer) decimal Char (character) hexadecimal Char (character) BCD Alarm second 0-59 00-3B 0-59 |
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 |