参数资料
型号: DS1215
厂商: DALLAS SEMICONDUCTOR
元件分类: XO, clock
英文描述: Using the Dallas Phantom Real Time Clocks(实时时钟芯片)
中文描述: 0 TIMER(S), REAL TIME CLOCK, PDIP16
文件页数: 11/13页
文件大小: 64K
代理商: DS1215
APPLICATION NOTE 52
022394 11/13
EXAMPLE SOURCE CODE FOR 8051 MICROCONTROLLER
Figure 7
; 8051CODE.DOC
; RTC procedure to access the DS1215 Serial Timekeeper, or DS1216
; SmartWatch using 8031, 8051 or 80C196
;
BIT_SEG SEGMENT BIT
RSEG BITSEG
WF: DBIT 1
BYTE_SEG SEGMENT DATA
RSEG BYTE_SEG
BUFF: DS 8
;Centi–sec: 00–99
;
;Seconds: 00–59
;
;Minutes: 00–59
;
;Hours: 01–12 / 00–23
;
;Day:1nHEX % RST off, n=DAY# 01–07
;
;Date: 01–31
;
;Month: 01–12
;
;Year: 00–99
CODESEG SEGMENT CODE
RSEG CODE_SEG
;**************************
;*** MAIN PROGRAM GOES HERE
;**************************
;
; Main program SETS WF for Read Mode and on return from RTC the BUFF will
; contain the 8 bytes of data read from the clock. If WF is CLEARED then
; RTC will return after writing the 8 byte BUFF to the clock.
;
; NOTE !!! : Refer to the DS1215 (RAM MODE) or DS1216 data sheet.
;
RTC: PUSH PSW ;Save user registers.
PUSH ACC
PUSH B
MOV B, RO
PUSH B
MOV RO, #BUFF ;Load pointer to start of table.
LCALL OPEN ;Set up to open the DS1216.
MOV B, #8H ;Load loop counter for 8 bytes.
JNB WF, WRITETIME ;Read/Write mode check.
;
READTIME: LCALL RBYTE ;Read one byte.
MOV @RO, A ;Save in RTn temporary register.
INC R0 ;Temporary data register pointer.
DJNZ B, READTIME ;Loop to read 8 bytes.
SJMP ENDTIME ;Done reading goto finish.
;
WRITETIME: MOV A, @R0 ;Load byte of data to be written.
LCALL WBYTE ;Write one byte.
INC R0 ;Temporary data register pointer.
DJNZ B, WRITETIME ;Loop to write 8 bytes.
相关PDF资料
PDF描述
DS1216B SmartWatch/RAM 16K/64K(16K/64K位带实时时钟的掉电保护RAM插座)
DS1216C SmartWatch/RAM 16K/65K(16K/65K位带实时时钟的掉电保护RAM插座)
DS1216D(中文) Using the Dallas Phantom Real Time Clocks(256K/1M位带实时时钟的带掉电保护SRAM插座)
DS1216D Using the Dallas Phantom Real Time Clocks(256K/1M位带实时时钟的带掉电保护SRAM插座)
DS1216E SmartWatch/RAM 16K/66K(16K/66K带实时时钟的ROM或掉电保护RAM插座)
相关代理商/技术参数
参数描述
DS1215G 制造商:未知厂家 制造商全称:未知厂家 功能描述:Peripheral IC
DS1215GN 制造商:未知厂家 制造商全称:未知厂家 功能描述:Peripheral IC
DS-1215ZJ 制造商:Hikvision USA 功能描述:Camera Pole Mount Plate7.64In X 4.61In X 3.94In 制造商:HIKVISION 功能描述:CAMERA POLE MOUNT PLATE 7.64IN X 4.61IN X 3.94IN
DS1216 制造商:MAXIM 制造商全称:Maxim Integrated Products 功能描述:SmartWatch RAM (DS1216B/C/D/H); SmartWatch ROM (DS1216E/F)
DS1216B 功能描述:存储器控制器 SmartWatch RAM RoHS:否 制造商:Maxim Integrated