參數(shù)資料
型號: AN1759
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: Add a Non-Volatile Clock to the MC68HC705J1A
中文描述: 添加非易失時鐘的MC68HC705J1A
文件頁數(shù): 22/24頁
文件大?。?/td> 316K
代理商: AN1759
Application Note
AN1759
22
*** Read Time, store away in HC05 time buffer for verification
* Write starting address
jsr
START_SER
;start serial transmission
lda
jsr
lda
jsr
#DS1307_WRITE
TXD
#SECONDS
TXD
;address the DS1307 device, write
;start address of DS1307 read
jsr
STOP_SER
;stop serial transmission
* Read Time data put in HC05 buffer
jsr
START_SER
;start serial transmission
lda
jsr
jsr
sta
jsr
sta
jsr
sta
jsr
sta
jsr
sta
jsr
sta
jsr
sta
#DS1307_READ
TXD
RXD
BUF_SECOND
RXD
BUF_MINUTES
RXD
BUF_HOURS
RXD
BUF_DAY
RXD
BUF_DATE
RXD
BUF_MONTH
RXD_LAST
BUF_YEAR
;address the DS1307 device, read
;read seconds, store to buffer
;read minutes, store to buffer
;read hours, store to buffer
;read the day, store to buffer
;read the date, store to buffer
;read the month, store to buffer
;read the year, store to buffer
jsr
STOP_SER
;stop serial transmission
DUMMY
bra
DUMMY
;test sequence is over
*** SUBROUTINES ********************************************************************
*** Sends out Start command on bus
START_SER
bclr
SDA,SER_PORT
bclr
SCL,SER_PORT
rts
;SDA=0
;SCL=0
*** Sends out Stop command on bus
STOP_SER
bset
bset
rts
SCL,SER_PORT
SDA,SER_PORT
;SCL=1
;SDA=1
*** Routine takes contents of AccA and transmits it serially to
*** the DS1307, MSB first
*** Looks for ACK, goes to ERROR routine if no ACK
TXD
ldx
#8T
;set counter
WRITE
asla
bcc
bset
bra
bclr
brn
;Carry bit = MSB
J1
SDA,SER_PORT
CLOCK_IT
SDA,SER_PORT
J1
;SDA=1
;branch to clock_it
;SDA=0
;evens it out
J1
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.
相關(guān)PDF資料
PDF描述
AN1768 ADMISSIBLE AVALANCHE POWER OF SCHOTTKY DIODES
AN1775 Expanding Digital Input with an A/D Converter
AN1816 USING THE HC912B32 TO IMPLEMENT THE DISTRIBUTED SYSTEMS INTERFACE (DSI) PROTOCOL
AN2104 Using Background Debug Mode for the M68HC12 Family
AN2154FAP TV/Video Signal Processor
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN175C25A 制造商:NEW SURPLUS HARDWARE 功能描述:
AN176-20A 制造商:AN# - MILITARY 功能描述:
AN176-40 制造商:AN# - MILITARY 功能描述:
AN1768 制造商:未知廠家 制造商全稱:未知廠家 功能描述:ADMISSIBLE AVALANCHE POWER OF SCHOTTKY DIODES
AN176H22A 制造商:NEW SURPLUS HARDWARE 功能描述: