Difference between revisions of "Component: IntOsc Helper (Matrix Tools)"

From Flowcode Help
Jump to navigationJump to search
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| MatrixTSL
 
| MatrixTSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Matrix Tools
 
| Matrix Tools
 
|}
 
|}
 +
 +
 +
==IntOsc Helper component==
 +
A component to help configure the speed of the internal oscillator. Currently only supports 8-bit PIC devices.
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_IntOsc_Helper.fcfx FC_Comp_Source_IntOsc_Helper.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_IntOsc_Helper.fcfx FC_Comp_Source_IntOsc_Helper.fcfx]
 +
 +
==Detailed description==
 +
 +
  
  
  
==[[File:Component Icon 3e5cc6d0_3e36_46b8_bc40_f238a5735b6e.png|Image]] IntOsc Helper component==
+
 
A component to help configure the speed of the internal oscillator.
+
 
Currently only supports 8-bit PIC devices.
+
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 
The INT OSC helper component is designed to help you configure the rate of the internal oscillator on-board your microcontroller.
 
The INT OSC helper component is designed to help you configure the rate of the internal oscillator on-board your microcontroller.
  
Line 41: Line 93:
  
 
Next change the clock speed in the project options to match your oscillator speed. This will ensure that delays and baud rates are calculated correctly.
 
Next change the clock speed in the project options to match your oscillator speed. This will ensure that delays and baud rates are calculated correctly.
 +
 +
If the clock speed is not available as a dropdown value, then you can manually enter the speed value.
  
 
[[File:INTOSC4.jpg]]
 
[[File:INTOSC4.jpg]]
  
  
Finally you need to enable the internal oscillator in the configuration settings.
+
 
 +
Finally, you need to enable the internal oscillator in the configuration settings.
  
 
[[File:INTOSC6.jpg]]
 
[[File:INTOSC6.jpg]]
Line 54: Line 109:
 
[[File:INTOSC5.jpg]]
 
[[File:INTOSC5.jpg]]
  
==Downloadable macro reference==
 
  
''This component does not contain any downloadable macros''
 
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
==Property reference==
 
<span style="font-weight: normal;"><u>Oscillator Speed</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''OscSpeed''.
 
  
Shows what internal oscillator speeds are available on the device and allows the user to select an option.
 
  
<span style="font-weight: normal;"><u>Info</u></span>
 
  
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''Info''.
 
  
General info to the user, checks to see if the selected oscillator speed matches the project oscillator speed.
+
==Macro reference==
  
<span style="font-weight: normal;"><u>Code</u></span>
+
===Initialise===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Called to set the internal oscillator speed to the specified value.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''Line of text'' and can be referenced with the variable name ''Code''.
 
  
Code to configure the internal oscillator module.
+
==Property reference==
  
This code must be added to a C icon which should be placed at the top of main.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Oscillator Speed
 +
|-
 +
| colspan="2" | Shows what internal oscillator speeds are available on the device and allows the user to select an option.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 +
| width="90%" | Info
 +
|-
 +
| colspan="2" | General info to the user, checks to see if the selected oscillator speed matches the project oscillator speed.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 +
| width="90%" | Code
 +
|-
 +
| colspan="2" | Code to configure the internal oscillator module. This code must be added to a C icon which should be placed at the top of main.&nbsp;
 +
|}

Latest revision as of 13:11, 7 February 2023

Author MatrixTSL
Version 1.0
Category Matrix Tools


IntOsc Helper component

A component to help configure the speed of the internal oscillator. Currently only supports 8-bit PIC devices.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_IntOsc_Helper.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_IntOsc_Helper.fcfx

Detailed description

No detailed description exists yet for this component

Examples

The INT OSC helper component is designed to help you configure the rate of the internal oscillator on-board your microcontroller.

It can be found under the Runtime -> Matrix Tools component category.


The oscillator speed drop down menu shows you what speeds are available on your device. Use this to select a speed.

INTOSC1.jpg


Once you have chosen your required internal oscillator speed copy the code from the Code property.

INTOSC2.jpg


Paste the configuration code into a C icon at the top of your main macro.

INTOSC3.jpg


Next change the clock speed in the project options to match your oscillator speed. This will ensure that delays and baud rates are calculated correctly.

If the clock speed is not available as a dropdown value, then you can manually enter the speed value.

INTOSC4.jpg


Finally, you need to enable the internal oscillator in the configuration settings.

INTOSC6.jpg


If everything is correct then the Info field should confirm that the project options clock speed matches the current speed selection.

INTOSC5.jpg






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Called to set the internal oscillator speed to the specified value. 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Oscillator Speed
Shows what internal oscillator speeds are available on the device and allows the user to select an option. 
Fc9-type-11-icon.png Info
General info to the user, checks to see if the selected oscillator speed matches the project oscillator speed. 
Fc9-type-11-icon.png Code
Code to configure the internal oscillator module. This code must be added to a C icon which should be placed at the top of main.