数做出调节
case1
afe
ifafe
1
afe
59
write_sfm13afe
write_com0x800x4013
break
case2
ashiifashi1
ashi23write_sfm10ashiwrite_com0x800x4010break
voidwirte_ds1302_byteuchardat
ucharifori0i8i
sclk0iodat0x01
ds1302字节写
fdatdat1sclk1
voidwrite_ds1302ucharadduchardat
rst0_
op_空操作sclk0_
op_rst1_
op_wirte_ds1302_byteaddwirte_ds1302_bytedatrst0io1sclk1
ucharread_ds1302ucharadd
ucharivaluerst0_
op_空操作sclk0_
op_rst1_
op_wirte_ds1302_byteaddfori0i8i
valuevalue1sclk0ifio
valuevalue0x80sclk1rst0_
op_空操作sclk0_
op_
ds1302写函数ds1302读函数
fsclk1io1retur
value
voidset_rtc
write_ds13020x8e0x00year1year10yearyear10yearyearyear116write_ds13020x8cyear
ds1302时间设置
关写保护转换为十六进制
week1week10weekweek10weekweekweek116write_ds13020x8aweek
mo
th1mo
th10mo
thmo
th10mo
thmo
thmo
th116write_ds13020x88mo
th
day1day10dayday10daydayday116write_ds13020x86day
shi1shi10shishi10shishishi116write_ds13020x84shi
fe
1fe
10fe
fe
10fe
fe
fe
116write_ds13020x82fe
miao1miao10miaomiao10miaomiaomiao116write_ds13020x80miao
write_ds13020x8e0x80开写保护
fflag10
voidread_rtc
year2read_ds13020x8dweek2read_ds13020x8bmo
th2read_ds13020x89day2read_ds13020x87shi2read_ds13020x85fe
2read_ds13020x83miao2read_ds13020x81
voidtime_pros进制
year5year216year2year216year2year2year510
mo
th5mo
th216mo
th2mo
th216mo
th2mo
th2mo
th510
day5day216day2day216day2day2day510
shi5shi216shi2shi216shi2shi2shi510
fe
5fe
216fe
2fe
216fe
2fe
2fe
510
miao5miao216miao2miao216miao2miao2miao510
从ds1302中读时间从ds1302中读出的时间转换为十
f
voiddisplay
write_sfm6miao2write_com0x800x406
显示函数
write_sfm3fe
2write_com0x800x403
write_sfm0shi2write_com0x800x400
write_weekweek2write_com0x8011
write_
yr8day2write_com0x808
write_
yr5mo
th2write_com0x805
write_
yr2year2write_com0x802
ifashishi2afe
fe
2
alarm
voidalarm
beep0delay1000beep1
闹钟
fvoidmai
i
itwhile1
keysca
ifflag0
keysca
read_rtctime_prosdisplay
主函数初始化
按键函数
fr