Component: DALI Slave (Comms)

From Flowcode Help
Jump to navigationJump to search


Author MatrixTSL
Version 1.0 (Release)
Category Comms


Image DALI Slave component

A serial based communications protocol designed for controlling lighting, specifically digitally controlled dimmable fluorescent ballasts. DALI requires the signals to be level shifted from VCC and GND to +9.5V - +25.5V and GND using external circuitry.

Examples

No additional examples


Downloadable macro reference

ReceiveForwardFrame

Attempts to receive an 16-bit command from the master controller.

0xFFFF indicates timeout or no reply

Parameters

This macro has no parameters


Return value

UINT


CheckForIndividualAddress

Tests the 16-bit incoming data for the defined individual address

Returns 0 for no match, returns 1 for a match

Parameters

UINT Data


Return value

BYTE


CollectDataByte

Returns the data byte from a 16-bit data packet

Parameters

UINT Data


Return value

BYTE


CheckForGroupAddress

Tests the 16-bit incoming data for the defined group address

Returns 0 for no match, returns 1 for a match

Parameters

UINT Data


Return value

BYTE


CollectPacketType

Returns if the incoming packet was data or a command.

Return of 0 = Data

Return of 1 = Command

Parameters

UINT Data


Return value

BYTE


TransmitBackwardFrame

Send out a 8-bit frame consisting of a data byte.

Parameters

BYTE Data
Data Byte


Return value

BYTE


Initialise

Configures the UART serial interface.

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

TX Pin

This property is of type Single digital pin and can be referenced with the variable name TXPIN.

No additional information


RX Pin

This property is of type Single digital pin and can be referenced with the variable name RXPIN.

No additional information


Individual Address

This property is of type Unsigned integer and can be referenced with the variable name IndAddress.

Address ranging from 0-63

Group Address

This property is of type Unsigned integer and can be referenced with the variable name GrAddress.

Address ranging from 0-15

Injector

This property is of type Fixed list of ints and can be referenced with the variable name Injector.

No additional information