This demo will demonstrate how you can send data back-and-fourth between MCUs, via Local Network using UDP Blocks. The UDP blocks are available since Waijung 13.11a, and allow you to communicate between target MCU and host PC. UDP can also be used to communicate between MCUs.
UDP protocol provides fast communication between multiple units within local Network. It makes use of available network infrastructure, giving flexibility in terms of location and distance. The cabling is easy to manage. Lastly, UDP can be used to communicate between MCUs and PCs, and MCUs and MCUs.
In order to make UDP blocks work, we need to add two blocks,
The two main blocks for this DEMO are;
In this demo, we send signals of two push buttons to the other MCU to light up two LEDs. The following picture show Block Diagram for both MCUs;
Block Diagram for Simulink Model
Model File:
The bear minimum hardware requirement is;
The following photo shows the hardware used and their configuration;
Two set of STM32F4 Discovery, F4 Connect, aMG Ethernet INF connected to the same network
The demonstration clip showing real-time communication between MCUs via Network using UDP. When you push buttons on one board, that will signal LEDs on on the other board, and vice versa.