DS3231 (1307) Alarm setting how to

Post your requests and ideas on the future development of mikroBasic PRO for PIC.
Post Reply
Author
Message
fabrock1957
Posts: 10
Joined: 28 Nov 2013 18:52

DS3231 (1307) Alarm setting how to

#1 Post by fabrock1957 » 30 Aug 2016 07:54

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

User avatar
nadir.celebic
mikroElektronika team
Posts: 465
Joined: 15 Jun 2016 13:19

Re: DS3231 (1307) Alarm setting how to

#2 Post by nadir.celebic » 30 Aug 2016 16:28

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.

fabrock1957
Posts: 10
Joined: 28 Nov 2013 18:52

Re: DS3231 (1307) Alarm setting how to

#3 Post by fabrock1957 » 18 Sep 2016 20:41

Thank you for your kind reply. I will check it .
Regards ,

Fabio

fabrock1957
Posts: 10
Joined: 28 Nov 2013 18:52

Re: DS3231 (1307) Alarm setting how to

#4 Post by fabrock1957 » 18 Sep 2016 20:47

...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

User avatar
nadir.celebic
mikroElektronika team
Posts: 465
Joined: 15 Jun 2016 13:19

Re: DS3231 (1307) Alarm setting how to

#5 Post by nadir.celebic » 19 Sep 2016 16:27

Hi,

Can you please be more specified?

Regards,
Nadir

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: DS3231 (1307) Alarm setting how to

#6 Post by janni » 19 Sep 2016 16:56

fabrock1957 wrote:I recall something about PIC16 memory 'pages' , but know nothing on how to cope with them...in a Mikrobasic way.
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).
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.

Post Reply

Return to “mikroBasic PRO for PIC Wish List”