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

From Flowcode Help
Jump to navigationJump to search
(XML import BR)
 
(One intermediate revision by the same user not shown)
Line 20: Line 20:
  
 
==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 57: Line 56:
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
''This component does not contain any downloadable macros''
+
===<span style="font-weight: normal;"><u><tt>InitIntOscSpeed</tt></u></span>===
 +
Called to set the internal oscillator speed to the desired value.
 +
 
 +
'''Parameters'''
 +
 
 +
:''This macro has no parameters''
 +
 
 +
 
 +
'''Return value'''
 +
 
 +
:''This call does not return a value''
 +
 
 +
 
  
 
==Simulation macro reference==
 
==Simulation macro reference==
Line 69: Line 80:
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''OscSpeed''.
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''OscSpeed''.
  
''<span style="color:red;">No additional information</span>''
+
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>
 
<span style="font-weight: normal;"><u>Info</u></span>
Line 77: Line 86:
 
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''Info''.
 
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''Info''.
  
''<span style="color:red;">No additional information</span>''
+
General info to the user, checks to see if the selected oscillator speed matches the project oscillator speed.
 
 
 
 
  
 
<span style="font-weight: normal;"><u>Code</u></span>
 
<span style="font-weight: normal;"><u>Code</u></span>
Line 85: Line 92:
 
This property is of type ''Line of text'' and can be referenced with the variable name ''Code''.
 
This property is of type ''Line of text'' and can be referenced with the variable name ''Code''.
  
Code to add to a C icon which should be placed at the top of main.
+
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.

Latest revision as of 15:46, 16 February 2017


Author MatrixTSL
Version 1.0 (Release)
Category Matrix Tools


Image IntOsc Helper component

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

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

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

Downloadable macro reference

InitIntOscSpeed

Called to set the internal oscillator speed to the desired value.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Oscillator Speed

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.

Info

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.

Code

This property is of type Line of text and can be referenced with the variable name 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.