AST-CAN485 I/O Shield (24V) Hookup Guide
Software Setup and Programming
This board is a shield for the AST-CAN485 development board and is not programmed directly. There is a library for the CAN485 which enables some board features and contains some examples. It can be downloaded from the GitHub Repo or by clicking the button below to manually install.
JTAG
One limitation of the shield is that JTAG debugging and Input 24V I1 cannot be used at the same time. Input V24 I1 is connected to pin A6 on the CAN485, this pin is also used for JTAG debugging. In order to use that input channel, JTAG debugging must be disabled. This is done automatically when calling the board initialization function provided by the library.
Examples
The library also includes several examples which demonstrate the use of the board. After installing the library, open up one the examples listed in the folder File > Examples > AST_V241O through the Arduino IDE. Select the CAN485 as the board, the COM port that it enumerated on, and hit upload to test.
- BlinkOneOutput -- Turn 24V O1 (D4) on and off.
- CycleOutputs -- Toggle all pins connected to the 24V output.
- ReadInputs -- Read all 24V input pins and print to serial monitor at a baud rate of
1000000
. - ReadInputsToOutputs -- Read the inputs and toggle outputs.