| Author
|
Matrix TSL
|
| Version
|
1.1
|
| Category
|
MIAC Module
|
MIAC NXT / ECU component
Component to drive the MIAC NXT / MIAC ECU range of hardware.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_MIAC_NXT_Component_Source.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_MIAC_NXT_Component_Source.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
DisplayClear
|
DisplayClear
|
| Clears all text from the display
|
- VOID
|
Return
|
DisplayClearLine
|
DisplayClearLine
|
| Clears a single line of text from the display
|
- BYTE
|
Line
|
| Line to clear. Range 0 to CharacterHeight - 1
|
- VOID
|
Return
|
DisplayCursor
|
DisplayCursor
|
| Moves the current pixel position of the cursor within the coordinate space
|
- UINT
|
X
|
| Sets the pixel position on the X plane, 0 is the left most pixel
|
- UINT
|
Y
|
| Sets the pixel position on the Y plane, 0 is the top most pixel
|
- VOID
|
Return
|
DisplayGetCursorPosition
|
DisplayGetCursorPosition
|
| Gets the current pixel position of the cursor within the coordinate space
|
- BYTE
|
Axis
|
| 0=X, 1=Y
|
- UINT
|
Return
|
DisplayPixel
|
DisplayPixel
|
| Sets or clears a pixel at location X, Y.
|
- UINT
|
X1
|
|
|
- UINT
|
Y1
|
|
|
- BOOL
|
State
|
| 0=Off / 1=On
|
- VOID
|
Return
|
DisplayPrintASCII
|
DisplayPrintASCII
|
| Prints a single ASCII character to the display
|
- BYTE
|
Character
|
| Holds an ASCII value e.g. 'A'
|
- VOID
|
Return
|
DisplayPrintFloat
|
DisplayPrintFloat
|
| Prints a formatted floating point number to the display
|
- FLOAT
|
Number
|
|
|
- BYTE
|
DecimalPoints
|
| Number of decimal points to display
|
- VOID
|
Return
|
|
DisplayPrintFormattedNumber
|
| Will allow you to print a number up to 32-bits with signed or unsigned formatting. Signed = -2147483648 to 2147483647 Unsigned = 0 to 4294967295
|
- ULONG
|
Number
|
| Enter the number or variable to print to the display
|
- BOOL
|
Format
|
| 0 = Signed, 1 = Unsigned
|
- VOID
|
Return
|
DisplayPrintNumber
|
DisplayPrintNumber
|
| Prints a number to the display as an ASCII string
|
- INT
|
Number
|
| Enter the number or variable to print to the display
|
- VOID
|
Return
|
DisplayPrintString
|
DisplayPrintString
|
| Prints a string of ASCII characters to the display
|
- STRING
|
Text
|
| Enter the text or variable to print to the display
|
- VOID
|
Return
|
Initialise
|
Initialise
|
| Starts up the MIAC IO and display.
|
- VOID
|
Return
|
|
InputAnalogByte
|
| Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255
|
- BYTE
|
Channel
|
| Range: 1 - 8
|
- BYTE
|
Return
|
|
InputAnalogInt
|
| Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095
|
- BYTE
|
Channel
|
| Range: 1 - 8
|
- UINT
|
Return
|
|
InputDigital
|
| Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1
|
- BYTE
|
Channel
|
| Range: 1 - 8
|
- BOOL
|
Return
|
Print
|
Print
|
| This macro prints a string of characters to the Graphical LCD.
|
- STRING
|
Str
|
| String of characters to send to the display.
|
- UINT
|
X1
|
| X pixel coordinate to set the output string position.
|
- UINT
|
Y1
|
| Y pixel coordinate to set the output string position.
|
- BYTE
|
Font
|
| Selects which Font to use Range: 0 to Font Count
|
- BYTE
|
Transparent
|
| Specifies if the background of the text is drawn - 0 = Background colour is drawn, 1 = Background colour not drawn.
|
- VOID
|
Return
|
ReadEEPROM
|
ReadEEPROM
|
| Read a single byte from the EEPROM.
|
- UINT
|
Address
|
|
|
- BYTE
|
Return
|
ReadKeypad
|
ReadKeypad
|
| Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value. Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc..
|
- UINT
|
Return
|
ReadTransistorOutputCurrent
|
ReadTransistorOutputCurrent
|
| Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps
|
- BYTE
|
Channel
|
| Range: 1 - 6 - 1=A / 2=B / 3=C / 4=D / 5=E / 6=F
|
- FLOAT
|
Return
|
ReadUSBConnected
|
ReadUSBConnected
|
| Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0.
|
- BOOL
|
Return
|
RelayOutputState
|
RelayOutputState
|
| Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off.
|
- BYTE
|
Channel
|
| Range: 1 - 2 Where 1=Q1 / 2=Q2
|
- BOOL
|
State
|
| 0 = Relay Open Circuit / 1 = Relay Closed Circuit
|
- VOID
|
Return
|
TransistorOutputState
|
TransistorOutputState
|
| Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled.
|
- BYTE
|
Channel
|
| Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F
|
- BYTE
|
State
|
| 0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput
|
- VOID
|
Return
|
TransistorPWMDuty
|
TransistorPWMDuty
|
| Sets the PWM duty on the selected channel
|
- BYTE
|
Channel
|
| Range: 1-4 Where 1=A / 2=B / 3=C / 4=D
|
- BOOL
|
EnableOrState
|
| 1 = Enable / 0 = State
|
- UINT
|
Duty
|
| Range: 0 - 65535
|
- VOID
|
Return
|
TransistorPWMEnable
|
TransistorPWMEnable
|
| Enables or disables PWM on the selected channel
|
- BYTE
|
Channel
|
| Range: 1-4 Where 1=A / 2=B / 3=C / 4=D
|
- BOOL
|
EnableOrState
|
| PWM on Enable Pin or State Pin - 1 = Enable / 0 = State
|
- BOOL
|
OnOrOff
|
| 1 = Enabled / 0 = Disabled
|
- VOID
|
Return
|
WriteEEPROM
|
WriteEEPROM
|
| Write a single byte to a location in the EEPROM.
|
- UINT
|
Address
|
|
|
- BYTE
|
Data
|
|
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Transistor Output PWM Settings
|
|
Prescaler Divide
|
| Allows the user to change the number of program cycles per PWM cycle count. Note that all PWM channels based on the same timer will share the same prescaler.
|
|
Period Register
|
| Allows the user to change the number of counts for the whole PWM period. Note that all PWM channels based on the same timer will share the same period overflow. PIC/AVR Range: 0 - 255 16-bit PIC Range: 0 - 65535
|
|
PWM Timer
|
| Timer associated with PWM to drive the output. Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.
|
|
Frequency (Hz)
|
|
|
|
Display Settings
|
|
Foreground Color
|
| Specifies the initial foreground color.
|
|
Background Color
|
| Specifies the initial background color.
|
|
Font
|
| Font picker to decide which font to use on your display.
|
|
Character Spacing
|
| Sets the number of blank pixels between each character when printing text. Default 1.
|
|
Space Width
|
| Sets the number of horizontal pixels used to represent a space character.
|
|
Pin Connections
|
|
CAN (2 x Internal + 1 x External MCP2515)
|
|
C1 TX
|
|
|
|
C1 RX
|
|
|
|
C2 TX
|
|
|
|
C2 RX
|
|
|
|
C3 MOSI
|
|
|
|
C3 MISO
|
|
|
|
C3 SCK
|
|
|
|
C3 CS
|
|
|
|
C3 INT
|
|
|
|
C3 RES
|
|
|
|
LIN
|
|
LIN TX
|
|
|
|
LIN RX
|
|
|
|
LIN Enable
|
|
|
|
Bluetooth RN4678
|
|
BT TX
|
|
|
|
BT RX
|
|
|
|
BT Reset
|
|
|
|
Wifi ESP12S
|
|
Wifi TX
|
|
|
|
Wifi RX
|
|
|
|
Wifi Reset
|
|
|
|
Ethernet W5500
|
|
ETH MOSI
|
|
|
|
ETH MISO
|
|
|
|
ETH SCK
|
|
|
|
ETH CS
|
|
|
|
ETH INT
|
|
|
|
ETH RES
|
|
|