Author
|
Matrix TSL
|
Version
|
1.0
|
Category
|
Movement Orientation
|
Gyroscope 3-Axis I2C (L3GD20) component
Interface to the L3GD20 three axis digital gyroscope. Panel GUI can be used to simulate incoming data for testing.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Gyroscope_L3GD20_I2C.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Gyroscope_L3GD20_I2C.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
|
SampleDevice
|
Reads the Axis data from the device.
|
- BYTE
|
Return
|
|
GetGyroReading
|
Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
Read the data byte at the given address of the device
|
- BYTE
|
Reg
|
address of the register to be read
|
- BYTE
|
Return
|
|
WriteRegister
|
Writes the data byte to the given address of the device. Returns 0 if successful
|
- BYTE
|
Reg
|
address of register to be written with data byte
|
- BYTE
|
data
|
data byte to be written to device register
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the component. Returns 0 if successful
|
- BYTE
|
Return
|
Property reference
|
Properties
|
|
Output Data Rate
|
Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
Enables automatic internal filtering on the gyro data
|
|
X Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Connection
|
|
Address Pin
|
The state of the SDO address pin. 0 = Connected to GND 1 = Connected to VCC
|
|
Channel
|
Channel selection
|
|
SDA
|
Pin used for SDA (data signal)
|
|
SCL
|
Pin used for SCL (clock signal)
|
|
Baud Select
|
Baud rate option selector
|
|
Baud Rate
|
Baud rate to be used
|
|
Stop Delay
|
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
|
|
Simulation
|
|
Label
|
|
|
Simulate Comms
|
Controls where the simulation data comes from. Component GUI - Data comes from the sliders on the component panel GUI API - Comms data is sent and received via an API component
|
==Macro reference==
|
SampleDevice
|
Reads the Axis data from the device.
|
- BYTE
|
Return
|
|
GetGyroReading
|
Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
Read the data byte at the given address of the device
|
- BYTE
|
Reg
|
address of the register to be read
|
- BYTE
|
Return
|
|
WriteRegister
|
Writes the data byte to the given address of the device. Returns 0 if successful
|
- BYTE
|
Reg
|
address of register to be written with data byte
|
- BYTE
|
data
|
data byte to be written to device register
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the component. Returns 0 if successful
|
- BYTE
|
Return
|
Property reference
|
Properties
|
|
Output Data Rate
|
Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
Enables automatic internal filtering on the gyro data
|
|
X Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Connection
|
|
Address Pin
|
The state of the SDO address pin. 0 = Connected to GND 1 = Connected to VCC
|
|
Channel
|
Channel selection
|
|
SDA
|
Pin used for SDA (data signal)
|
|
SCL
|
Pin used for SCL (clock signal)
|
|
Baud Select
|
Baud rate option selector
|
|
Baud Rate
|
Baud rate to be used
|
|
Stop Delay
|
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
|
|
Simulation
|
|
Label
|
|
|
Simulate Comms
|
Controls where the simulation data comes from. Component GUI - Data comes from the sliders on the component panel GUI API - Comms data is sent and received via an API component
|
==Macro reference==
|
SampleDevice
|
Reads the Axis data from the device.
|
- BYTE
|
Return
|
|
GetGyroReading
|
Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
Read the data byte at the given address of the device
|
- BYTE
|
Reg
|
address of the register to be read
|
- BYTE
|
Return
|
|
WriteRegister
|
Writes the data byte to the given address of the device. Returns 0 if successful
|
- BYTE
|
Reg
|
address of register to be written with data byte
|
- BYTE
|
data
|
data byte to be written to device register
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the component. Returns 0 if successful
|
- BYTE
|
Return
|
Property reference
|
Properties
|
|
Output Data Rate
|
Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
Enables automatic internal filtering on the gyro data
|
|
X Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Connection
|
|
Address Pin
|
The state of the SDO address pin. 0 = Connected to GND 1 = Connected to VCC
|
|
Channel
|
Channel selection
|
|
SDA
|
Pin used for SDA (data signal)
|
|
SCL
|
Pin used for SCL (clock signal)
|
|
Baud Select
|
Baud rate option selector
|
|
Baud Rate
|
Baud rate to be used
|
|
Stop Delay
|
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
|
|
Simulation
|
|
Label
|
|
|
Simulate Comms
|
Controls where the simulation data comes from. Component GUI - Data comes from the sliders on the component panel GUI API - Comms data is sent and received via an API component
|
==Macro reference==
|
SampleDevice
|
Reads the Axis data from the device.
|
- BYTE
|
Return
|
|
GetGyroReading
|
Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
Read the data byte at the given address of the device
|
- BYTE
|
Reg
|
address of the register to be read
|
- BYTE
|
Return
|
|
WriteRegister
|
Writes the data byte to the given address of the device. Returns 0 if successful
|
- BYTE
|
Reg
|
address of register to be written with data byte
|
- BYTE
|
data
|
data byte to be written to device register
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the component. Returns 0 if successful
|
- BYTE
|
Return
|
Property reference
|
Properties
|
|
Output Data Rate
|
Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
Enables automatic internal filtering on the gyro data
|
|
X Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Connection
|
|
Address Pin
|
The state of the SDO address pin. 0 = Connected to GND 1 = Connected to VCC
|
|
Channel
|
Channel selection
|
|
SDA
|
Pin used for SDA (data signal)
|
|
SCL
|
Pin used for SCL (clock signal)
|
|
Baud Select
|
Baud rate option selector
|
|
Baud Rate
|
Baud rate to be used
|
|
Stop Delay
|
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
|
|
Simulation
|
|
Label
|
|
|
Simulate Comms
|
Controls where the simulation data comes from. Component GUI - Data comes from the sliders on the component panel GUI API - Comms data is sent and received via an API component
|