Dear all, unfortunately after the design I noticed that the chip for the rtc are ds1302. These chips have no alarms so I need to make software alarms. Can someone explain how can I achieve this ?
comment
probably a few ways to do it ,depending on the PIC type and what 'alarm times' you need...
step one...save the 'alarm times' into RAM or EEPROM or hardcode into program memory. it's up to you to decides where to put them.
step two...in 'main' have a simple if(current_time==alarm_time){do this} type of code....
there are several examples on this forum and in the examples folder that
CCS supplies...
..also look at any DS RTC with alarms to see how they setup to do it..
how 'fancy' the code becomes depends on you as only you know you want it to work! In my energy control systems I only need a byte to store any 'alarm time',you'll probably need more..
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum