RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Moderator: Benj
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Where can I find a description of the component macro, and examples?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
After adding component to 2D or 3D panel.
Right click on the panel component, then select Help.
If there are any examples you will see them on the page that will be displayed.
Did you have a particular component in mind?
Right click on the panel component, then select Help.
If there are any examples you will see them on the page that will be displayed.
Did you have a particular component in mind?
Martin
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Thanks. I am so glad to get this component macro. Am testing it now.
Going to use it on a 2 axis solar tracker, for which I need a few time variables.
Going to use it on a 2 axis solar tracker, for which I need a few time variables.
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
It worked. Kudos to the developers. Beats writing code that the macro does.
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Another question.
I have been using this RTC (DS-3231) on an application - a solar single axis tracker. Sww watt-tracker.com.
As usual, I forgot to document some code segments. The code below code was before the RTC midule was availible.
To Wit:
One subroutine I call PowerFromBattery
It goes like this:
I2C transmit byte 208 - this is a write command
I2C transmit byte 0x0E - I believe this is the control register
I2C transmit byte (0b00011100)
I can not remember what it does exactly, or from where I got it.
Any suggestions?
I have been using this RTC (DS-3231) on an application - a solar single axis tracker. Sww watt-tracker.com.
As usual, I forgot to document some code segments. The code below code was before the RTC midule was availible.
To Wit:
One subroutine I call PowerFromBattery
It goes like this:
I2C transmit byte 208 - this is a write command
I2C transmit byte 0x0E - I believe this is the control register
I2C transmit byte (0b00011100)
I can not remember what it does exactly, or from where I got it.
Any suggestions?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Hi billduck,
Did that help or you need further assistance?
Did that help or you need further assistance?
Martin
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
I guess I need to go read this very carefully <https://datasheets.maximintegrated.com/en/ds/DS3231.pdf>
and see what 00011100 means. I know it's binary, but what it does in the contril register is the key.
My goal is to 1. figure out what it does, 2. See if I can implement it in the RTC component macro.
and see what 00011100 means. I know it's binary, but what it does in the contril register is the key.
My goal is to 1. figure out what it does, 2. See if I can implement it in the RTC component macro.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Looking at the datasheet its just controlling the frequency of the square wave and only whe the alarm match the time keeping registers.billduck wrote: see what 00011100 means.
Does that ring a bell?
Martin
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Well, thanks. I thought it had something to do with the button cell battery. So the code segment was entirely unnecessary. I will supress it and verify that the code performs as expected.
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Mr Medelec35. What is incorrect with this FC example? I ram trying to show passing a variable to a subroutine and returning a variable.
Hope it is well documented.
Hope it is well documented.
- Attachments
-
- Subroutines with parameters and return variables.fcfx
- (9.57 KiB) Downloaded 146 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Hi,
What you need to do is double click the Call Subroutine (or right click, select properties) within main.
Add the variable you want to retrieve from the Call Subroutine like this: If done correctly, you should see the call subroutine change with the required returned variable assigned to it:
What you need to do is double click the Call Subroutine (or right click, select properties) within main.
Add the variable you want to retrieve from the Call Subroutine like this: If done correctly, you should see the call subroutine change with the required returned variable assigned to it:
Martin
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: RTC upgrade for FC, V8.1.1.11 downloaded 4/6/20
Made that change. Thanks. The problem, I discovered was that .Angle in the sub was an integer. My Bad