Hi , I am using ( with minor changes ) the MikroBasicPro example on writing/reading DS3231 RTC and it works.
I am stuck when trying to set the alarm into the rtc registers ( which I write in a similar way for time setting , except for the control register which is written without BCD conversion ) ..
Anybody knows how to set and perhaps make it send the Interrupt signal out ?
I will make my code available if it can be useful to get out of it.
Thanks!
Fabio
DS3231 (1307) Alarm setting how to
- nadir.celebic
- mikroElektronika team
- Posts: 465
- Joined: 15 Jun 2016 13:19
Re: DS3231 (1307) Alarm setting how to
Hi,
Unfortunately, at this moment we don't have add-on board with this module DS3231, so we are unable to give proper support for it.
You may have a look at the following projects from LibStock, which can serve you as starting point :
https://libstock.mikroe.com/projects/vi ... c-with-avr
https://libstock.mikroe.com/projects/vi ... -atmega128
Regards,
Nadir.
Unfortunately, at this moment we don't have add-on board with this module DS3231, so we are unable to give proper support for it.
You may have a look at the following projects from LibStock, which can serve you as starting point :
https://libstock.mikroe.com/projects/vi ... c-with-avr
https://libstock.mikroe.com/projects/vi ... -atmega128
Regards,
Nadir.
-
- Posts: 10
- Joined: 28 Nov 2013 18:52
Re: DS3231 (1307) Alarm setting how to
Thank you for your kind reply. I will check it .
Regards ,
Fabio
Regards ,
Fabio
-
- Posts: 10
- Joined: 28 Nov 2013 18:52
Re: DS3231 (1307) Alarm setting how to
...Still working on my project with DS3231...
What I noticed is that my program , though made of several sub procedures I recall here and there , makes my PIC16F876 behave in erratic way ....I mean , I reached about 55% of occupied memory and even the littlest change ( adding or moving some procedure or adjusting small parts ) makes my program behave unpredictly....
I recall something about PIC16 memory 'pages' , but know nothing on how to cope with them...in a Mikrobasic way.
Any advice?
Thank you so much
Fabio
What I noticed is that my program , though made of several sub procedures I recall here and there , makes my PIC16F876 behave in erratic way ....I mean , I reached about 55% of occupied memory and even the littlest change ( adding or moving some procedure or adjusting small parts ) makes my program behave unpredictly....
I recall something about PIC16 memory 'pages' , but know nothing on how to cope with them...in a Mikrobasic way.
Any advice?
Thank you so much
Fabio
- nadir.celebic
- mikroElektronika team
- Posts: 465
- Joined: 15 Jun 2016 13:19
Re: DS3231 (1307) Alarm setting how to
Hi,
Can you please be more specified?
Regards,
Nadir
Can you please be more specified?
Regards,
Nadir
Re: DS3231 (1307) Alarm setting how to
It's unlikely that program memory is a problem. mB handles the 'pages' by itself. Most probably you have a problem with RAM - either because mB doesn't handle IRP bit automatically (higher memory banks are not switched), or your code overwrites some variables (due to wrong declarations).fabrock1957 wrote:I recall something about PIC16 memory 'pages' , but know nothing on how to cope with them...in a Mikrobasic way.
Note that, due to optimization, even small code changes may drastically affect variables' distribution in RAM, so it may look like code modifications are responsible for unpredictable behaviour, while in fact RAM changes cause it.