Component: IntOsc Helper (Matrix Tools)

From Flowcode Help
Revision as of 16:14, 16 November 2021 by Wiki bot (talk | contribs)
Jump to navigationJump to search
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.

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.

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

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


Fc9-comp-macro.png CheckBuffer
Returns the number of values in the transmit or receive buffer 
[[File:]] - Buffer
0=Transmit / 1=Receive 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ReceiveString
Gets a string from the receive buffer 
Fc9-u16-icon.png - UINT MaxChars
 
Fc9-u16-icon.png - UINT Timeout
Time in milliseconds to wait for data 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Initialise
Initialises the UART component pins ready to send and receive data 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveByteArray
Receives an array of bytes and returns the number of bytes received. 
Fc9-u8-icon.png - BYTE Data
A byte array variable to hold the received data 
Fc9-u16-icon.png - UINT NumBytes
Maximum number of bytes to try and receive 
Fc9-u16-icon.png - UINT Timeout
Max amount of time in ms to wait between bytes 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ReceiveString
Receives a string of bytes and returns the number of bytes received. 
Fc9-string-icon.png - STRING StringData
 
Fc9-u16-icon.png - UINT NumBytes
Maximum number of bytes to try and receive 
Fc9-u16-icon.png - UINT Timeout
Max amount of time in ms to wait between bytes 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Uninit
Un-initialize the UART and release the resources 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetList
Gets Named property List 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Delay
Software UART Bit Delay 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetValue
set Value of Named property 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Uninit
Un-initialize the UART and release the resources 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetList
Gets Named property List 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png ReceiveByteArray
Receives an array of bytes and returns the number of bytes received. 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE NumBytes
Maximum number of bytes to try and receive 
Fc9-u8-icon.png - BYTE Timeout
Max amount of time in ms to wait between bytes 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReceiveString
Receives a string of bytes and returns the number of bytes received. 
Fc9-string-icon.png - STRING StringData
 
Fc9-u8-icon.png - BYTE NumBytes
Maximum number of bytes to try and receive 
Fc9-u8-icon.png - BYTE Timeout
Max amount of time in ms to wait between bytes 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png GetList
returns Named property list 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING 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. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations