CANNY 7.3 Echo

CANNY 7.3 Echo — the first production CANNY controller supporting both the CAN 2.0 and CAN-FD standards. In addition to an extended 12/24V power supply range and two CAN/CAN-FD interfaces that support operation in both independent and gateway modes, the controller features two low-side discrete input/output channels. These channels include software-configurable pull-down to GND and hardware pull-up to the supply voltage, allowing them to control external loads in discrete and PWM modes, process inputs from external switches or other discrete signal sources, or be used as LIN (Master or Slave) and Dallas 1-Wire interfaces.

General Information

CANNY 7.3 Echo has a limited number of external channels and can therefore be classified as a smart relay or a Nano PLC.

CANNY•7.3 Echo – the first serial CANNY controller supporting both the CAN 2.0 standard and the CAN-FD standard with data transfer rates up to 4 Mbps and message lengths up to 64 bytes.

CANNY 7.3 Echo has the following unique combination of features:

  • Nominal supply voltage of 7…28V;
  • Acceptable voltage range on I/O channels of 0…32V;
  • Two independent, software-configurable I/O channels that can operate as either low-side outputs or inputs, with a maximum current of 100mA each, sufficient to control typical automotive relays;
  • Two CAN-FD / CAN 2.0A/B interfaces compatible with ISO-11898 and SAE J2411, widely used in automotive and industrial automation;
  • Support for popular data exchange interfaces: 2 UARTs, 2 LINs, Dallas 1-Wire;
  • Built-in power management tools for the controller’s internal power consumption in the range of 5 to 30mA, allowing for efficient battery management when the vehicle is idle;
  • Non-volatile program memory and sixty-four 16-bit non-volatile data memory cells accessible to the user application, capable of preserving critical data during power failures;
  • Wide operating temperature range from -40 to +85°C;
  • Built-in protection against high-voltage surges and power supply reversal;
  • Compact IP50-rated enclosure suitable for installation and operation in vehicle cabins.

The CFD (Canny Function Diagram) visual programming language was created specifically for the purpose of creating applications in a fast, intuitive fashion. These programs are called function diagrams. The free CannyLab IDE is used to create, edit, debug and deploy these programs.

Note: Before you start, please make sure that the USB-A to microUSB adapter cable you are using supports data transfer, i.e. it is not only intended for charging certain devices.

The amount of controller memory accessible to you is enough to accommodate a function diagram consisting of several hundred function blocks. This allows you to implement fairly sophisticated algorithmms.

The controller has LED controlled from the user application, useful for indicating controller operation mode and debugging.

Design and functional operation

The appearance and layout

The main components of CANNY 7.3 Echo are:

  • a micro controller (MCU) with the auxiliary circuits;
  • power supply system for all controller elements;
  • IO channels level matching circuit;
  • electric protection system;
  • connector and LED.

All of these components are based on a single 40 х 15 mm printed circuit board, mounted inside a quick-to-open plastic housing.

The controller has contact pads for soldering wires or installing an 8-pin dual-row connector and a microUSB port. Depending on the configuration, a set of wires or a harness with an 8-pin dual-row connector may be included for connecting the controller to power and external devices. The 8 contact pads/8-pin dual-row connector contain the following: power input +7V…+28V, power input GND, CAN0-H, CAN0-L, CAN1-H, CAN1-L, and two contacts corresponding to I/O channels #0 and #1 of the controller. The microUSB port on the controller is used to connect the interface cable connecting the controller to a PC.

All contacts on the 8-pin connector are duplicated by edge contacts on the controller board, allowing the controller to be used as an embedded controller using surface mount technology. In addition, the microUSB connector contacts are also duplicated by edge contacts, which allows the microUSB connector to be placed outside the controller board when embedding the controller.

CANNY 7.3 Echo appearance
CANNY 7.3 Echo pins and contacts

Contact pads intended for setting up the jumpers of CANNY 7.3 Echo

The controller board has contact pads on the back of the board near the connector. These are used to install jumpers for connecting 120 Ohm terminating resistors for the CAN0 and CAN1 interfaces. By default, the terminating resistors are installed but not connected.

Also on the back of the board are jumper pads for connecting positive pull-ups to the controller’s I/O channels.

Jumper pads and special contacts of CANNY 7.3 Echo controller

Overall and installation dimensions of the controller

Overall and installation dimensions of CANNY 7.3 Echo

Recommended dimensions and location of pads for surface mounting of the controller

Recommended dimensions and location of pads for surface mounting CANNY 7.3 Echo

Software Architecture

CANNY 7.3 Echo is a digital programmable computing controller. Its main structural elements are:

  • arithmetic logic unit (ALU);
  • internal memory;
  • command execution management subsystem;
  • input-output system.
CANNY 7.3 Echo software architecture

Arithmetic Logic Unit is the processing core of CANNY 7.3 Echo. ALU is used to execute both system software and function diagrams that were uploaded into the controller’s internal memory. The controller’s internal memory is divided into the EEP program memory, EEP data memory, and ROM. The command management subsystem is responsible for switching and setting up the operation mode of the controller. The IO system is used to communicate with the outside world, using both discrete IO channels and standard digital interfaces CAN / LIN / UART.

Software Structure

CANNY 7.3 Echo software structure

The bootloader enables the operation of the controller in the software download mod by organizing data transmission between CANNY 7.3 Echo and the PC using the USB protocol. It is responsible for checking the integrity of data transmitted for PC and subsequently writing it to the controller’s internal memory. The bootloader is placed into the internal memory of the controller during production and can not be deleted or modified by you.

The manufacturer distributes CANNY 7.3 Echo firmware in the CCX file format. Firmware includes an operating system and a set of drivers providing function diagram execution and its interaction with controller resources. You can write/erase firmware to/from the controller, but you cannot modify CCX file content.

The function diagram is created and modified in CannyLab IDE. You can then save it to a CFD file or load it into the controller where it specifies the controller’s algorithm in Run mode. Custom diagrams can be written multiple times to the controller and saved from the CannyLab environment in CFD format files.

Operation modes

There are three operation modes, each of them used for specific functionality.

Software upload mode

In software download mode, the controller is ran by bootloader. The bootloader writes firmware and function diagrams according to commands received from the CannyLab IDE. Transition to this mode happens automatically when the controller is connected to a PC via a USB cable. During the transition to software upload mode the controller performs a master reset: the function diagram execution stops, IO channels are switched to the neutral state, built-in green LED turns on. When the controller establishes communication with CannyLab, the green LED starts blinking.

This mode is exited automatically when the controller is disconnected from the PC. When exiting the mode if system software is loaded into the EEPROM correctly, the controller will switch to running mode, otherwise it returns to software download mode.

Running mode

Run mode is the controller’s main operation mode. In this mode, the controller is operated by the system software continuously, executing the function diagram in a never-ending loop. Transition to this mode happens automatically when the controller is connected to an external 12…24V power supply and not connected via USB. In this mode the function diagram has access to all controller resources that are supported by the drivers currently uploaded to the controller.

Sleep mode

This mode is a variant of run mode in which the controller pauses to reduce its power consumption to a minimum after each loop of the function diagram. Thus, the controller operates in a “pulsed” mode, periodically “falling asleep” and “waking up”. Enable, disable, and configure the parameters of this mode via the function diagram. This mode is useful when developing systems where power consumption matters, such as on-board car equipment.

Runtime Environment

Functional diagram presentation

Programs for CANNY 7.3 Echo controller, function diagrams are developed within the CannyLab IDE. Upon uploading the diagram to the controller, it is automatically processed by the translator. The translator checks the consistency of the diagram, determines function block execution order and converts the diagram into the executable code - a sequence of machine instructions for CANNY 7.3 Echo controller’s ALU.

The execution order

When written to the controller the executable program code is included in the sequence of system software machine instructions. Thus, the entire command sequence for a controller that contains both system software and a function diagram will be:

  • initialisation routine executed once after each reset of the controller;
  • infinite loop, called the diagram execution loop. It consists of:
  • procedures for reading the status of hardware resources;
  • executable function diagram code;
  • procedures for changing the status of hardware resources.
Algorithm of diagram execution by CANNY 7.3 Echo controller

Some of the drivers included in the controller system software, such as the CAN driver, need the controller to react immediately to program events and received data. Program code of these drivers is asynchronously processed by the controller in parallel with the main execution flow. When processing asynchronous drivers calls, the execution of the diagram’s main loop is briefly suspended.

Access to hardware resources

The following resources are available from the function diagram:

  • controller system resources;
  • IO subsystem;
  • additional drivers included in the system software.

All of these resources appear within the controller’s internal memory protected address space. This address space is divided into input and output registers.

You can use input registers as a source of input data for virtually any function block of the diagram. This allows you to access and use the data received by the controller from the outside world for your algorithms. For example, you can access information about the electric potential on any of the controller’s connector pins, or data packet contents received via the CAN bus.

You can use output registers as the output target for any function block on the diagram. This lets you control controller resources from the function diagram, which lets you influence objects in the outside world. For example, you can switch an external relay by changing the electrical potential on one of the pins of the controller, turn the controller LED on, set CAN operation mode, send a data packet via the CAN bus.

To use most controller resources you will first need to assign the necessary operating parameters, such as the polarity of output channels, the polarity and the sensitivity of input channels, CAN communication speed and so on.

Assigning these parameters is done by recording special constants into one or several specific output registers, depending on the resource that needs to be accessed. For example, writing a constant with a value of 1 into the register located at 460 address sets the CAN0 driver settings to operate with the bus at 125 kBaud.

In the CannyLab environment, for user convenience, all available controller registers are named, as are all special constants used when interacting with controller resources. Therefore, for a CannyLab user, this operation would appear as setting a constant named “CAN Interface Endbled on 125k bit/s” to a register named “CAN0 Nominal Baud Rate Setup Register”.

Writing a constant to a controller register

Similarly, by setting a constant with the value 768 in the register located at address 113, the operating mode of channel #0 is set as a negative polarity output, and by the appearance of the value “1” in the register located at address 4039 (“DIO Input Value Register, IO Channel 0”), we can learn about the application of a positive electrical potential to contact #5 of the controller connector.

Receiving a signal at the input of the CANNY 7.3 Echo controller

Controllers’ Registers

System Registers

Main article: CANNY 7.3 Echo. System Registers

System resources are divided into an address group of input registers and an address group of output registers. By accessing these registers from the function diagram you can receive useful information about the current status of the controller, and control its operating mode. The set of system registers is located in the “System Registers” folder of the CannyLab IDE registers list. The list is accessible via “Input Register” and “Output Register” context menu options in the editor.

Discrete Inputs and Outputs

Main article: CANNY 7.3 Echo. Discrete Inputs and Outputs

CANNY 7.3 Echo gives you access to two discrete general purpose IO channels. Each channel is physically accessed through a corresponding pin of connector X1 (Channels 0 and 1). By writing and reading data of the respective driver registers, the functional diagram can manage the electric potential in each of these contacts, as well as get information about the current potential of each of them.

The physical characteristics of these channels allow them to be connected to a variety of external devices. All channels can be used to work with any type of load, for example: electromagnetic relays, small electric motors, LEDs, low current systems. You can use a variety of input signal sources, such as: mechanical, electromechanical, and electronic buttons and switches, pulse generators, voltage source 0-24V, transistor outputs of various equipment, etc.

Channel operation mode and parameters are set via the function diagram. At any given moment in time, the channels can only work in one of the possible modes, but it is possible to dynamically override the channel configuration from the function diagram.

High Resolution PWM

Main article: CANNY 7.3 Echo. High Resolution PWM Driver

Any of the controller’s IO channels supports high-resolution pulse-width modulation (HR PWM) operation. Up to two independent HR PWM channels can be simultaneously enabled, each with its own period and duty cycle settings. During controller operation, the HR PWM channels can be reconfigured using a user-defined diagram. In HF PWM mode, the PWM timing parameters—period and duty cycle—are set in a range from 2 to 65,535 microseconds, in 1 microsecond increments.

Using the HR PWM driver allows these controller channels to operate asynchronously to the functional diagram, ensuring maximum stability in the generated signal’s timing parameters.

HR PMW driver operates using the controller’s channel resources, but has a higher priority than the discrete input-output driver. This means that for all channels, for which the HR PMW driver is activated, all value changes in registers associated with discrete input-output driver will be ignored.

CAN driver

Main article: CANNY 7.3 Echo. CAN Driver

The CANNY 7.3 Echo controllers have two independent CAN interfaces and supporting both the CAN 2.0 and CAN-FD standards. Two pair specialized external contacts of the 8-pin connector X1 are provided for connection to digital information CAN-bus or CAN-FD: contacts #1 and #7 used by the CAN0 interface driver (CAN0-L и CAN0-H), contacts #4 and #6 used by the CAN1 interface driver (CAN1-L и CAN1-H).

The CANNY 7.3 Echo controller CAN driver has 16 hardware filters for each of its CAN interfaces.

Interfaces CAN0 and CAN1 have individual settings and can operate at different data exchange rates, which allows you to connect CANNY 7.3 Echo controller to two different CAN buses simultaneously.

CAN Scheduled Asynchronous Transmitter Driver

Main article: CANNY 7.3 Echo. CAN Scheduled Asynchronous Transmitter Driver

The asynchronous CAN transmission driver enables sending CAN messages independently of the functional diagram, with predefined parameters, a set sending frequency, and a transmission start offset. Operating in asynchronous mode, in critical cases, allows for more stable message sending frequency than when sending from the functional diagram.

The user has access to 16 buffers for asynchronous CAN message transmission, with individual settings for the CAN interface number, identifier, data, and message sending frequency.

CAN Gateway Driver

Main article: CANNY 7.3 Echo. CAN Gateway Driver

Using the CAN gateway driver you can implement high-speed asynchronous relaying of messages between CAN hardware interfaces with optional filtering and alteration of specific CAN messages.

The CAN gateway driver allows you to set up individual processing of incoming CAN messages by configuring up to 14 selection rules (selectors).

LIN driver

Main article: CANNY 7.3 Echo. LIN Driver

The CANNY 7.3 Echo controller has two single-wire, half-duplex serial data interfaces. Each interface can simultaneously operate in UART or LIN 1.3-2.0 compatibility mode and be assigned to one of the controller’s IO channels.

Thus, both input-output channels of CANNY 7.3 Echo can be used to organize data reception and transmission as independent LIN driver channels.

LIN driver channels can be connected both in tandem and individually. They have individual settings for baud rate and bus node type - MASTER or SLAVE.

LIN driver operates using the controller’s channel resources, but has a higher priority than the discrete input-output driver. This means that for all channels, for which the LIN driver is activated, all value changes in registers associated with discrete input-output driver will be ignored.

UART / Modbus driver

Main article: CANNY 7.3 Echo. UART / Modbus Driver

The CANNY 7.3 Echo controller has two single-wire, half-duplex serial data interfaces. Each interface can simultaneously operate in UART or LIN 1.3-2.0 compatibility mode and be assigned to one of the controller’s IO channels.

Both CANNY 7.3 Echo IO channels can be used simultaneously to transmit and receive data as single-wire half-duplex or a single two-wire full-duplex UART interface with optional Modbus RTU support.

The UART channels can be connected either together or separately, and have individual data transfer rate settings. Size of receive and transmit buffers for each of the interfaces of the CANNY 7.3 Echo UART driver is 64 bytes.

Dallas 1-Wire Driver

Main article: CANNY 7.3 Echo. Dallas 1-Wire Driver

CANNY 7.3 Echo controller can be used as a MASTER in a single-wire data network Dallas 1-Wire®. The controller is only capable of sending requests for data to slave devices.

All CANNY 7.3 Echo input-output channels can be used to connect the controller to 1-Wire bus. At the same time, that channel must be externally pulled-up to 5V with a 3-7k Ohm resistor.

Depending on the specific mode (defined through the function diagram), the CANNY 7.3 Echo implementation makes it possible to communicate with a specific device through the 1-Wire bus by using the device address. This enables the controller to work with several SLAVE devices through one channel. It’s also possible to perform a serial connection of the controller to several 1-Wire buses. In operating modes when device handling by address is not available, therefore you will only be able to connect to one SLAVE node per channel.

User Preprogrammed Parameters

Main article: CANNY 7.3 Echo. User Preprogrammed Parameters

The custom configuration parameters can be specified by the end user when loading software into the controller using SFX-files. After uploading software and running the controller in standalone mode, parameters set by user become available in the function diagram within the relevant controller registers list folder.

Proper use of user-defined parameters significantly increases the flexibility and versatility of controller-based solutions, enabling the end user to make safe changes in controller operation algorithm, using a simple user interface, bypassing the need for teaching them how to work with CannyLab.

EEPROM Non-volatile Memory

Main article: CANNY 7.3 Echo. EEPROM Driver

To eliminate loss of critical information (controller’s state, external device status, etc.) in case of a power failure, the CANNY 7.3 Echo controller is equipped with non-volatile memory. The values saved in EEPROM will be available in special registers after the power is restored.

There are 64 16-bit non-volatile memory cells, which are accessed by using the corresponding input and output registers. The non-volatile memory resource is at least 100,000 write cycles.

Note: Working with non-volatile memory does not require any special pre-configuration.

SEE ALSO