arhi
Member
I'm slowly getting crazy, I'm doing some measurements every ~30 minutes and recording them to 24lc512 .. I added the PCF8583 (as I had one lying around) in order to store the exact datetime when measurement was taken. As this 30min does not have to be too accurate (29-31) I used some internal counter (18f2550 running at 48MHz) that was incremented by the timer in order to trigger the measurement every ~30minutes but as I have the darn RTC on board and the darn thing should be able to sync the interrupt pin down on "alarm" but either the data sheet is not clear or nicotine deprivation I'm going trough now is doing something to my cognitive abilities...
In general, what I can see is that PCF8583's 2 ports are relevant to the problem:
CONFIG addr[ 0x00 ]
ALARM addr[ 0x08 ]
With regards to config (0) the relevant bits should be 0,1,2 where I have no idea of the 0,1 bits use (or they are just read only flags when the interrupt triggers); the bit 2 is alarm enable bit. So, I set the config bit to 0x04
ALARM config register (8), this get's tricky, I want interrupt every 30min so, the "timer vs clock" confuses me here. In general, I'd like timer (I do not care how much time it is, just trigger the interrupt every 30min) ... I was totally unable to get anything from here, all combinations I tried I only got 2 things
- int always high (pull up)
- int triggers every 1sec
Any ideas, how to make the darn thing trigger the int every 30min (or 15min or 45min) or this is not possible with PCF8583, I have too many devices on the i2c bus (4x24lc512, lcd, 5 sensors, pcf8583) and PIC is not "idle" during those ~30minutes, so if this RTC can trigger the int on 30min interval, great, if not, I'll continue the way I'm doing it now.
thanks in advance
In general, what I can see is that PCF8583's 2 ports are relevant to the problem:
CONFIG addr[ 0x00 ]
ALARM addr[ 0x08 ]
With regards to config (0) the relevant bits should be 0,1,2 where I have no idea of the 0,1 bits use (or they are just read only flags when the interrupt triggers); the bit 2 is alarm enable bit. So, I set the config bit to 0x04
ALARM config register (8), this get's tricky, I want interrupt every 30min so, the "timer vs clock" confuses me here. In general, I'd like timer (I do not care how much time it is, just trigger the interrupt every 30min) ... I was totally unable to get anything from here, all combinations I tried I only got 2 things
- int always high (pull up)
- int triggers every 1sec
Any ideas, how to make the darn thing trigger the int every 30min (or 15min or 45min) or this is not possible with PCF8583, I have too many devices on the i2c bus (4x24lc512, lcd, 5 sensors, pcf8583) and PIC is not "idle" during those ~30minutes, so if this RTC can trigger the int on 30min interval, great, if not, I'll continue the way I'm doing it now.
thanks in advance