Component: One Wire Dummy (Misc): Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_One_Wire_Dummy.fcfx FC_Comp_Source_One_Wire_Dummy.fcfx] | |||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_One_Wire_Dummy.fcfx FC_Comp_Source_One_Wire_Dummy.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_One_Wire_Dummy.fcfx FC_Comp_Source_One_Wire_Dummy.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
| Line 42: | Line 46: | ||
==Examples== | ==Examples== | ||
| Line 66: | Line 72: | ||
==Macro reference== | ==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte''' | |||
|- | |||
| colspan="2" | Receives a byte from the one wire bus a bit at a time | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TransmitByte''' | |||
|- | |||
| colspan="2" | Transmit a byte to the one wire bus a bit at a time | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Command | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SkipROM''' | |||
|- | |||
| colspan="2" | Performs a bus reset and the sends the SkipROM command byte | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BusReset''' | |||
|- | |||
| colspan="2" | Issue a 'ping' on the bus. If there is at least one sensor on the bus then it will generate a presence pulse. Returns 0 if a presense pulse was detected Returns 1 no device was detected | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MatchROM''' | |||
|- | |||
| colspan="2" | Performs a reset followed by the MatchROM code and then the 8-bit ROM code. | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | FamilyCode | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | SerialNumber | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanBus''' | |||
|- | |||
| colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDeviceCount''' | |||
|- | |||
| colspan="2" | Returns the number of devices found by the last ScanBus operation. | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIDByte''' | |||
|- | |||
| colspan="2" | Returns byte ectet of the 64-Bit lasered ROM code, 255 on error | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Device | |||
|- | |||
| colspan="2" | Device ID - Range: 0 - NumDevices - 1 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | ByteIndex | |||
|- | |||
| colspan="2" | Index of the data byte. 0=FamilyCode, 1-6=Serial, 7=CRC | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Sets up the 1-Wire output pin ready for communications. | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
==Property reference== | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |||
|- | |||
|}==Macro reference== | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
Revision as of 15:23, 20 January 2023
| Author | Matrix Ltd |
| Version | 1.4 |
| Category | Misc |
One Wire Dummy component
Low level routines for controlling or interacting with a standard one wire interface.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_One_Wire_Dummy.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_One_Wire_Dummy.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
| ReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Return | |
| TransmitByte | |
| Transmit a byte to the one wire bus a bit at a time | |
| Command | |
| Return | |
| SkipROM | |
| Performs a bus reset and the sends the SkipROM command byte | |
| Return | |
| MatchROM | |
| Performs a reset followed by the MatchROM code and then the 8-bit ROM code. | |
| FamilyCode | |
| SerialNumber | |
| Return | |
| ScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Return | |
| GetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Return | |
| Initialise | |
| Sets up the 1-Wire output pin ready for communications. | |
| Return | |
Property reference
| Properties |
==Macro reference==
| ReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Return | |
| TransmitByte | |
| Transmit a byte to the one wire bus a bit at a time | |
| Command | |
| Return | |
| SkipROM | |
| Performs a bus reset and the sends the SkipROM command byte | |
| Return | |
| MatchROM | |
| Performs a reset followed by the MatchROM code and then the 8-bit ROM code. | |
| FamilyCode | |
| SerialNumber | |
| Return | |
| ScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Return | |
| GetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Return | |
| Initialise | |
| Sets up the 1-Wire output pin ready for communications. | |
| Return | |
Property reference
| Properties |
==Macro reference==
| ReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Return | |
| TransmitByte | |
| Transmit a byte to the one wire bus a bit at a time | |
| Command | |
| Return | |
| SkipROM | |
| Performs a bus reset and the sends the SkipROM command byte | |
| Return | |
| MatchROM | |
| Performs a reset followed by the MatchROM code and then the 8-bit ROM code. | |
| FamilyCode | |
| SerialNumber | |
| Return | |
| ScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Return | |
| GetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Return | |
| Initialise | |
| Sets up the 1-Wire output pin ready for communications. | |
| Return | |
Property reference
| Properties |