Intermediate
30 min

Scaling up your IoT projects with ease using FT6050 and PIC32MZ2048EFH100

Unleash the future of wired connectivity with FT Click!

FT Click with Flip&Click PIC32MZ

Published Oct 19, 2023

Click board™

FT Click

Dev. board

Flip&Click PIC32MZ

Compiler

NECTO Studio

MCU

PIC32MZ2048EFH100

Simplify the development and installation of scalable IoT solutions across diverse markets with a user-friendly Free Topology (FT) interface

A

A

Hardware Overview

How does it work?

FT Click is based on the FT6050, a smart transceiver from Renesas designed to simplify integration and maintenance of a complete system, and supports polarity-insensitive cabling using star, bus, daisy chain, loop, or combined topologies. The flexibility of Free Topology wiring frees the installer from the need to adhere to a strict set of wiring rules, reducing the time and expenses of device installation. It also simplifies network expansion by eliminating restrictions on wire routing, splicing, and device placement. The FT Click works as the communication layer for any embedded application. The main component is the system-on-chip FT 6050 smart transceiver, which combines strengths of BACnet and LON for the first time in one solution. In addition to the transceiver, on this board we have several other building blocks from Dialog including the FT-X3 communications transformer which provides

reliable communication without interference, and external AT25SF081 flash memory for storing additional resources for the FT 6050. In addition, the board also features an STMicroelectronics microcontroller whose role is to hold network custom stacks and APIs that are interpreted through the FT transceiver. The FT 6050 chip includes multiple processors, read-write and read-only memory (RAM and ROM), communication subsystems, and I/O subsystems. Each FT 6050 chip includes a processor core for running applications and managing network communications, memory, I/O, and a 48-bit identification number (the Neuron ID) that is unique to every device. FT 6050 devices simultaneously provide a LON, LON/IP, BACnet/IP Server, BACnet MS/TP server, and messaging interface. As mentioned, the FT Click uses an external AT25SF081 flash of 8Mb for storing

additional resources for the FT 6050. This flash contains active and standby bootloaders, system images, and applications. It also holds persistent system and application data, as well as data logs. Larger applications can be supported because certain code can be designated to be “transient” which means it is brought into RAM for execution out of flash only on demand. The FT-X3 external communication transformer enables operation in the presence of high frequency common-mode noise on unshielded twisted-pair networks. The transformer also offers outstanding immunity from magnetic noise, eliminating the need for protective magnetic shields in most applications ensuring robust communication. The FT Click interface supports all two-wire "Free Topology" twisted-pair networks with polarity-insensitive star, daisy chain, bus, loop, trunked, or mixed topology wiring with very high noise immunity.

FT Click hardware overview image

Features overview

Development board

Flip&Click PIC32MZ is a compact development board designed as a complete solution that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It comes with an onboard 32-bit PIC32MZ microcontroller, the PIC32MZ2048EFH100 from Microchip, four mikroBUS™ sockets for Click board™ connectivity, two USB connectors, LED indicators, buttons, debugger/programmer connectors, and two headers compatible with Arduino-UNO pinout. Thanks to innovative manufacturing technology,

it allows you to build gadgets with unique functionalities and features quickly. Each part of the Flip&Click PIC32MZ development kit contains the components necessary for the most efficient operation of the same board. In addition, there is the possibility of choosing the Flip&Click PIC32MZ programming method, using the chipKIT bootloader (Arduino-style development environment) or our USB HID bootloader using mikroC, mikroBasic, and mikroPascal for PIC32. This kit includes a clean and regulated power supply block through the USB Type-C (USB-C) connector. All communication

methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, user-configurable buttons, and LED indicators. Flip&Click PIC32MZ development kit allows you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

Flip&Click PIC32MZ double image

Microcontroller Overview

MCU Card / MCU

default

Architecture

PIC32

MCU Memory (KB)

2048

Silicon Vendor

Microchip

Pin count

100

RAM (Bytes)

524288

Used MCU Pins

mikroBUS™ mapper

NC
NC
AN
Reset
RE2
RST
SPI Chip Select
RA0
CS
SPI Clock
RG6
SCK
SPI Data OUT
RC4
MISO
SPI Data IN
RB5
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
NC
NC
PWM
NC
NC
INT
UART TX
RE3
TX
UART RX
RG9
RX
I2C Clock
RA2
SCL
I2C Data
RA3
SDA
NC
NC
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

FT Click Schematic schematic

Step by step

Project assembly

Flip&Click PIC32MZ front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Flip&Click PIC32MZ as your development board.

Flip&Click PIC32MZ front image hardware assembly
GNSS2 Click front image hardware assembly
Prog-cut hardware assembly
GNSS2 Click complete accessories setup image hardware assembly
Flip&Click PIC32MZ MB1 Access - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Flip&Click PIC32MZ MCU step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output

1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support

Library Description

This library contains API for FT Click driver.

Key functions:

  • ft_get_data_status - Use this function to get current status of data

  • ft_get_data - Use this function to read received data

  • ft_send_package - Use this function to send data to other module

Open Source

Code example

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.

/*!
 * @file 
 * @brief FT Click example
 * 
 * # Description
 * This example demonstrates the use of an FT click board by showing
 * the communication between the two click boards.
 *
 * The demo application is composed of two sections :
 * 
 * ## Application Init 
 * Initalizes device and makes an initial log.
 * 
 * ## Application Task
 * Depending on the selected application mode, it reads all the received data or 
 * sends the desired text message once per second.
 * 
 * @author MikroE Team
 *
 */

#include "board.h"
#include "log.h"
#include "ft.h"

// Comment out the line below in order to switch the application mode to receiver
#define DEMO_APP_TRANSMITTER

// Text message to send in the transmitter application mode
#define DEMO_TEXT_MESSAGE           "MIKROE - FT click board\r\n\0"

static ft_t ft;
static log_t logger;

void application_init ( void )
{
    log_cfg_t log_cfg;
    ft_cfg_t ft_cfg;

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    ft_cfg_setup( &ft_cfg );
    FT_MAP_MIKROBUS( ft_cfg, MIKROBUS_1 );
    if ( UART_ERROR == ft_init( &ft, &ft_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

#ifdef DEMO_APP_TRANSMITTER
    log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
    log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
    log_info( &logger, " Application Task " );
}

void application_task ( void )
{
#ifdef DEMO_APP_TRANSMITTER
    ft_send_package( &ft, DEMO_TEXT_MESSAGE, strlen( DEMO_TEXT_MESSAGE ), 1 );
    log_printf( &logger, " Sent data: %s", ( char * ) DEMO_TEXT_MESSAGE );
    Delay_ms( 1000 );
#else
    uint8_t rsp_data_buf[ FT_MAX_DATA_BUFFER ] = { 0 };
    uint8_t rx_byte = 0;
    if ( 1 == ft_generic_read( &ft, &rx_byte, 1 ) )
    {
        ft_isr_parser( &ft, rx_byte ); 
        if ( FT_NEW_DATA_AVAILABLE == ft_get_data_status( &ft ) )
        {
            if ( ft_get_data( &ft, rsp_data_buf ) )
            {
                log_printf( &logger, " Received data: %s", rsp_data_buf );
            }
        }
    }
#endif
}

void main ( void )
{
    application_init( );

    for ( ; ; )
    {
        application_task( );
    }
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.