An expansion board definition file for the Arduino Multifunction shield can be applied in Pins Tool to expansion headers available on the NXP board. This tutorial describes the steps of creating an XML expansion board file using the shield documentation and the expansion headers feature in the Pins tool. For details on the expansion headers feature, see the following article: Adding Expansion Headers to a custom board
You can apply the Arduino Multifunction shield on several NXP boards. This tutorial uses the FRDM K64F EVK board.
Figure 1 FRDM K64F EVK board
Figure 2 Expansion Header view in the Pins tool
Edit the following template according to the steps below.
<?xml version="1.0" encoding= "UTF-8" ?>
<expansion_board id="board_id" name="board_name"
xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/expansion_board_1.0 http://mcuxpresso.nxp.com/XSD/expansion_board_1.0.xsd"
xmlns="http://mcuxpresso.nxp.com/XSD/expansion_board_1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header_connection ref="expansion_header_def_id">
<connectors>
<connector ref="C1">
<pins>
<pin ref="1" name="pin name" signal_type="digital_in" description="pin description"/>
</pins>
</connector>
</connectors>
</header_connection>
<code_identifiers prefix="ARDUINO_"/>
</expansion_board>
Edit the id and name of the expansion board.
<?xml version="1.0" encoding= "UTF-8" ?>
<expansion_board id="arduino_multifunction_ds18b20_board" name="Arduino Multi DS18B20 board"
xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/expansion_board_1.0 http://mcuxpresso.nxp.com/XSD/expansion_board_1.0.xsd"
xmlns="http://mcuxpresso.nxp.com/XSD/expansion_board_1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
The element header_connection determines the id of an expansion header where the board can be applied to.
Figure 3 Edit expansion header dialog
<?xml version="1.0" encoding= "UTF-8" ?>
<expansion_board id="arduino_multifunction_ds18b20_board" name="Arduino Multi DS18B20 board"
xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/expansion_board_1.0 http://mcuxpresso.nxp.com/XSD/expansion_board_1.0.xsd"
xmlns="http://mcuxpresso.nxp.com/XSD/expansion_board_1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header_connection ref="frdm_arduino">
NOTE
Some other NXP boards can provide a single row Arduino expansion header, for example, MIMXRT1060-EVK. For these boards, create the definition file based on the single_row_arduino expansion header. The definition file varies only in pin references.
The tutorial describes how to add a pin element within the connector elements in three examples. See the marked pins on the shield below.
Figure 4 Arduino Multi-Function shield
Figure 5 Connector pin and connector tooltips in the Expansion header view
<connector ref="C1">
<pins>
<pin ref="10" name="5V" signal_type="power_supply_5V" description="Power supply +5V"/>
Figure 6 Connector pin and connector tooltips in the Expansion header view
<connector ref="C2">
<pins>
<pin ref="12" name="13" signal_type="digital_in" description="LED - D1"/>
Pin A4 is connected to the header U5 on the shield where two different external thermometers can be applied. The definition file you create is the variant for DS18B20. See the documentation for DS18B20: https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
Figure 7 Connector pin and connector tooltips in the Expansion header view
<connector ref="C4">
<pins>
<pin ref="10" name="A4" signal_type="digital" description="Thermometer DS18B20 or LM35 - U5"/>
See the complete expansion board definition file arduino_multifunction_ds18b20.xml and arduino_single_multifunction_ds18b20.xml in the CreateExpansionBoardFile.zip.
For information on the usage of this created board file see the following article: Measuring temperature using digital sensor DS18B20 and Arduino Multifunction Shield on FRDM K64F