??? 05/28/04 05:35 Read: times |
#71378 - RE: Power outage logger Responding to: ???'s previous message |
"so for a i2c I need to develop a protocol structure ? "
No need. All required routines for a simple master (MCU) slave (RTC chip )are available from a document from Philips. I will mail you the asm routines. You can develop from there. "Can it be done using 89c51 /52 I have a couple of them " Yes you can use them with the above routines which are normally bit-bang. Since the 89c51 does not have a IIC port, you can use the normal port pins and hence the name. "Also I nedded to know does the RTC need a separate crystal of 32,768Hz ? " Of course. Also you need to program the current time into the RTC and from then on it keeps time - don't forget the SEPERATE battery ( 3.6V or so) for the RTC if you choose a variety that does not have it on board. "Instead of a relay what could I use to signal the outage..." Incidentally what is wrong with a relay ? Simply power the relay from the mains derived dc supply and use a contact changeover to ground a port pin that is configured as an input.You can use one of the DIP relays and be done with it. Raghu |