Page 1 of 1

RTC clock setting

Posted: Thu Dec 02, 2021 9:28 pm
by WingNut
Help!
I can't figure out why the clock won't set in the first file yet I can get it to set in the simpler second file. Its a very meesy file I know but I'm still a novice at flowcode. Also it is really slow to run. It reads bytes from a file CFG_DAT.DAT. The first bytes are basically a value to set a sample rate - works fine. I've it set to 1 second but it takes about 4 minutes to run through a 5 stage loop. My main concern is not being able to set the clock on the rtc module yet I can produce a basic clock with what I see as the same procedure

Probably dead obvious but I jst cant see what the problem is

N

Re: RTC clock setting

Posted: Thu Dec 02, 2021 10:22 pm
by WingNut
Update. Not sure whats going on with the delay function this current file takes 20+ seconds instead of 3 to get beyond the decision :o


N

Re: RTC clock setting

Posted: Fri Dec 03, 2021 8:58 am
by medelec35
Can you try the one-second flasher test on your hardware to make sure the hardware is running at the correct speed?
I have just tried your flowchart and it is 3 seconds for me.

Re: RTC clock setting

Posted: Fri Dec 03, 2021 9:03 am
by WingNut
Hi Medelec. Oddly when I tried later it was running at 3 secs and this morning

Re: RTC clock setting

Posted: Fri Dec 03, 2021 10:54 am
by WingNut
The initial problem above i.e. clock setting appears to be related to variables. But I'm not sure how or why.

Re: RTC clock setting

Posted: Sun Dec 05, 2021 9:58 pm
by WingNut
For info.
So after a lot of adjusting, tweaking and twiddling i have it working of sorts. Since I originally used channel 1 for the sd card and changed by advice from stefan.erni, Ive managed to get the rtc clock to display data from the rtc and not some generic data the like of the simulation. Yes I know it wont simulate. However I chopped an changed and have settled on channel 1 for the i2c component of the rtc. What I did notice though is that chopping and changing to try to figure things out, I was caught out by flowcode always defaulting to a different pin configuration on the microcontroller. Its definitely something to watch out for as you cant remap pins unless you select software channel first - maybe its a bug but either way it kept me mind boggled for a week. I guess its due to the fact that I have 2 devices using either sdi or i2c.

Now just the time delay function to figure out before I can continue the deveolpment
Anyway onwards and upwards