Component: MIAC (Arduino Compatible) (MIAC Module)
Author | Matrix TSL |
Version | 1.1 (Release) |
Category | MIAC Module |
Contents
- 1 MIAC (Arduino_Compatible) component
- 2 Examples
- 3 Downloadable macro reference
- 3.1 RelayOFF
- 3.2 InputANALOG_10Bit
- 3.3 PrintString
- 3.4 GetKeypad
- 3.5 DisplayStart
- 3.6 PrintNumber
- 3.7 PrintASCII
- 3.8 DrawLine
- 3.9 PrintFormattedNumber
- 3.10 DrawRect
- 3.11 DisplayClear
- 3.12 RelayON
- 3.13 OutputOFF
- 3.14 DrawPixel
- 3.15 DisplayCursor
- 3.16 OutputON
- 3.17 InputDIGITAL
- 3.18 DisplayLight
- 3.19 DrawGlyph
- 3.20 InputANALOG
- 4 Simulation macro reference
- 5 Property reference
MIAC (Arduino_Compatible) component
MIAC - Matrix Industrial Automotive Controller (Arduino-Compatible)
Examples
No additional examples
Downloadable macro reference
RelayOFF
Turns off the requested relay given by parameter RelayID, values 1 to 4
Parameters
- BYTE RelayID
- The relay to turn off. From 1 to 4.
Return value
- This call does not return a value
InputANALOG_10Bit
No additional information
Parameters
- BYTE InputID
- The input to read. From 1 to 8.
Return value
PrintString
Prints the given character string to the display at the current cursor position and moves the cursor position.
Parameters
- <- STRING Str
- The string to send to the display.
- This parameter may be returned back to the caller
Return value
- This call does not return a value
GetKeypad
Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255
Parameters
- This macro has no parameters
Return value
DisplayStart
Initialise the display ready for use
Parameters
- This macro has no parameters
Return value
- This call does not return a value
PrintNumber
Prints the given number to the display starting at the current cursor position and moves the cursor position.
Parameters
- INT n
Return value
- This call does not return a value
PrintASCII
Prints the given character to the display at the current cursor position and increments the cursor position.
Parameters
- BYTE Char
- ASCII code of the character to print.
Return value
- This call does not return a value
DrawLine
Draws or clears a line from start at sx:sy to end at ex:ey
Parameters
- BYTE sx
- Start column position
- BYTE sy
- Start row position
- BYTE ex
- End column position
- BYTE ey
- End row position
- BYTE state
- 1=active pixel, 0=cleared pixel
Return value
- This call does not return a value
PrintFormattedNumber
Will allow you to print a number up to 32-bits with signed or unsigned formatting.
Signed = -2147483648 to 2147483647
Unsigned = 0 to 4294967295
Parameters
- ULONG Number
- Enter the number or variable to print to the LCD
- BOOL Format
- 0=Signed, 1=Unsigned
Return value
- This call does not return a value
DrawRect
Draws a rectangular box from x1,y1 to x2,y2
Parameters
- BYTE x1
- BYTE y1
- BYTE x2
- BYTE y2
- BYTE state
- 1=draw pixel, 0=clear pixel
Return value
- This call does not return a value
DisplayClear
Clears the display to white space
Parameters
- This macro has no parameters
Return value
- This call does not return a value
RelayON
Turns on the requested relay given by parameter RelayID, values 1 to 4
Parameters
- BYTE RelayID
- The relay to turn on from 1 to 4.
Return value
- This call does not return a value
OutputOFF
Outputs a digital low state on the output requested by parameter TransID
(Outputs 1 to 4)
Parameters
- BYTE TransID
- 1 to 4 (Outputs A to D)
Return value
- This call does not return a value
DrawPixel
Draws, or clears, a pixel at point x,y
Parameters
- BYTE px
- BYTE py
- BYTE state
- state = 0 clears the pixel, else draws the pixel
Return value
- This call does not return a value
DisplayCursor
Moves the display cursor to the given position.
If the cursor is set to the origin at x=0, y=0, then the next character sent to the display will appear in the top left corner.
Parameters
- BYTE x
- Position of the cursor in characters from left to right.
- BYTE y
- The line to move the cursor to.
Return value
- This call does not return a value
OutputON
Outputs a digital high state on the output requested by parameter TransID
(Outputs 1 to 4)
Parameters
- BYTE TransID
- 1 to 4 (Outputs A to D)
Return value
- This call does not return a value
InputDIGITAL
Returns the digital state of the input requested by parameter InputID
(Inputs 1 to 8)
Parameters
- BYTE InputID
- The input number from 1 to 8.
Return value
DisplayLight
Turns the display backlight on or off
Parameters
- BYTE state
Return value
- This call does not return a value
DrawGlyph
Draws a character glyph on the display at position px, py
Parameters
- BYTE glyph
- The glyph ident number
- BYTE px
- pixel column relative to the drawing origin (top left)
- BYTE py
- pixel row relative to the drawing origin (top left)
- BYTE mode
- 0=opaque/cleared background, 1=transparent background
Return value
- This call does not return a value
InputANALOG
Returns the 8 bit value for the analogue input requested by parameter InputID
(Inputs 1 to 8)
Parameters
- BYTE InputID
- The input to read from 1 to 8.
Return value
Simulation macro reference
EvClick
No additional information
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Property reference
This component does not contain any properties