首先要写保护寄存器,在对时钟或RAM写前WP一定要为0 WP是秒的最高位..列如:1.写秒:先写 DS1302Write(DS1302_SECOND_WRITE,0x00);//允许写 在写 DS1302Write(DS1302_SECOND_WRITE,0x56); 最后 DS1302Write(DS1302_SECOND_WRITE,0x80);//不允许写