miso dengaku
/
RTC8564NB_Sample
http://mbed.org/users/jf1vrr/programs/RTC8564NB_Clock/lqbcpuを改造してシリアルに垂れ流すようにしたもの。日時は手で設定
Diff: RTC8564.h
- Revision:
- 0:bfb6e89e28ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RTC8564.h Tue Jun 19 15:52:45 2012 +0000 @@ -0,0 +1,25 @@ +#define RTC8564NB_ADR 0xA2 + +#define CONTROL1 0x00 +#define CONTROL2 0x01 +#define SECONDS 0x02 +#define MINUTES 0x03 +#define HOURS 0x04 +#define DAYS 0x05 +#define WEEKDAYS 0x06 +#define MONTHS 0x07 +#define YEARS 0x08 +#define MINUTE_ALARM 0x09 +#define HOUR_ALARM 0x0A +#define DAY_ALARM 0x0B +#define WEEKDAY_ALARM 0x0C +#define CLOCKOUT_FREQ 0x0D +#define TIMER_CONTROL 0x0E +#define TIMER 0x0F +#define _READ 0x01 + + +void rtc_write(char address, char value); +char rtc_read(char address); +void time_just(); +void rtc_setdaytime(char y[3], char m[3], char d[3], char h[3], char min[3], char s[3], char week_val[2]); \ No newline at end of file