AST-CAN485 I/O Shield (24V) Hookup Guide

Contributors: Alex the Giant, Ell C, JamesBM
Favorited Favorite 0

Software Setup and Programming

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library or board add-on, please check out our library installation guide and instructions to install the AST-CAN485 board add-on files.

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.


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.


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.