element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Digilent, a National Instruments Company
  • Products
  • Manufacturers
  • Digilent, a National Instruments Company
  • More
  • Cancel
Digilent, a National Instruments Company
Blog Learn Embedded Systems with Basys MX3, PIC32MX Trainer Board
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Digilent, a National Instruments Company to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: alexwonglik1
  • Date Created: 8 Sep 2019 12:06 AM Date Created
  • Views 2271 views
  • Likes 5 likes
  • Comments 1 comment
  • basys mx3 trainer board
  • mx3
  • microprocessors
  • microchip
  • pic microcontroller
  • basys coursework
  • digilent basys mx3
  • mplabx
  • mcu*
  • microprocessor
  • pic32mx370f512l
  • motors
  • digilent
  • coursewrok
  • pic32mx
  • microcontroller
  • mcu
  • fir-compatible irda module
  • embedded system
  • basys
  • pic32
  • basys mx3
Related
Recommended

Learn Embedded Systems with Basys MX3, PIC32MX Trainer Board

alexwonglik1
alexwonglik1
8 Sep 2019

Digilent Basys MX3 Basys MX3 enables designers to quickly begin developing and debugging an embedded application. With an exhaustive set of peripherals plus Pmod expansion headers, you can create a wide range of embedded systems applications. The board also provides an easy and cost-effective introduction to the PIC32 microcontroller and MPLABRegistered X Integrated Development Environment (IDE).

 

image

 

The most exciting feature is the in-depth that comes with it. This coursework, titled “Embedded Systems with the Basys MX3 and PIC32MX370,” is completely free, open-source, and completes a full walk-around of the board. With a total of 7 theoretical teaching units and 15 labs, “Embedded Systems with the Basys MX3 and PIC32MX370” is meaty enough to teach every enthusiast all that they need about embedded systems.Below you’ll find a breakdown of the coursework and the concepts and skills each unit/lab targets.

 

 

Unit 1 - Microprocessor IO

Example data flow diagram from Unit 1.

Example data flow diagram from Unit 1. 

 

Right from the get-go, you will start getting familiar with the PIC32MX370 hardware by programming registers and creating a hardware configuration file. Data flow and control flow diagrams are used as part of project planning and to teach best design practices, including when and how to test. If you aren’t familiar with the MPLAB X software or need to brush up on programming in C, links to various tutorials are included. Some key takeaways for the creators are:

 

  • Understand best practices for creating dependable and sustainable software.
  • Know how to generate a microprocessor development project using MPLAB X.
  • Know how to generate a config_bits file for the PIC32MX370 processor.
  • Know how to configure the Microchip PIC32 processor pins as either digital inputs or outputs.
  • Understand the drive capability of a processor digital output.
  • Know how to write a C program for a specific application using an embedded system.
  • Know how to make speed performance measure on a processor-based system.

 

Lab 1a

 

The concepts discussed in Unit 1 are put into practice here by requiring you to write a program that uses the onboard switches to control the onboard RGB LED according to specified design requirements. As a student, you become familiar with read-modify-write operations to control the PIC32MX370 registers.

 

 

Lab 1b

 

The skills acquired in Lab 1a are extended to require you to create a simple calculator using the onboard switches, buttons and seven-segment display (SSD). You are introduced to timing through the use of software delay to achieve persistence of vision on the SSD, as well as atomic bit manipulation and bit-banging techniques.

 

 

Unit 2 - Elements of Real-time Systems

 

image

PIC32 interrupt handler block diagram from Unit 2.

 

 

Through the classic example application of controlling the rotor speed of a stepper motor, this unit investigates the concepts of multi-threaded process time management for a real-time dynamic system, using foreground-background task scheduling. Counter/timer hardware is discussed in some detail. Some of the key takeaways are:

 

  • How to implement task management based on polling PIC32 timers.
  • How to implement task management based on PIC32 timer interrupts.
  • How to set the period of a PIC32 timer.
  • How to write a software state machine.
  • How to allocate tasks to either foreground or background scheduling.
  • Understanding of stepper motor operations and applications.

 

 

Lab 2a

 

Adapting the code previously used in Lab 1a and 1b, you are required to display the state of the onboard push buttons on the onboard LEDs using debouncing techniques, change notification interrupts and polling.

 

 

Lab 2b

 

Extending the skills acquired in Lab 2a, you need to control the mode and direction of a stepper motor using the pushbuttons, control the speed of the stepper motor using the slide switches, and display the speed of the motor on the SSD.

 

 

Unit 3 - Parallel IO and Handshaking for LCD Control

image

Example timing diagram for four-phase handshaking from Unit 3.

 

 

In Unit 3, you will be introduced to digital communication by displaying static and dynamic data on the onboard parallel LCD. You will learn to translate timing diagrams provided by target equipment data sheets into timed sequences of program instructions, how to use ASCII encoded data, as well as experiment with the mechanisms required to synchronize asynchronous systems using hardware and software handshaking. Some of the key takeaways are:

 

 

  • How to use control flow diagrams to generate program code.
  • How to implement a bi-directional parallel IO interface.
  • How to use software delay to write control commands at specified intervals.
  • How to use software code to generate a minimum setup and hold times.
  • How to implement one form of handshaking.
  • How to read and interpret timing software modeling diagrams.

 

 

Lab 3a

 

Using direct IO control through bit-banging, you will develop and test a library of functions that allow text to be placed at any position on  the onboard parallel I/O character LCD, following the data flow and control flow diagram models presented in Unit 3.

 

 

 

Lab 3b

 

Using IO control through the parallel master port (PMP), you will develop and test a library of functions that allow text to be placed at any position on the onboard parallel I/O character LCD, following the data flow and control flow diagram models presented in Unit 3.

 

 

Unit 4 - Communications – Synchronous and Asynchronous Serial Protocols

 

 

image

Example parallel multiple slave SPI bus configuration with individual device select signals from lab 4c.

 

 

Unit 4 consists of two parts. Part 1 contains an overview that addresses different high-level views of digital communications including synchronous vs asynchronous and networking. Part 2 further addresses asynchronous communications protocols, specifically the Universal Asynchronous Receiver Transmitter (UART) protocol. Some key takeaways from Part 1 and Part 2 combined are:

 

  • Understanding of the basics of telecommunications.
  • Understanding of requirements and implementations of asynchronous and synchronous communications.
  • Application of asynchronous communications.
  • Knowledge of a PC terminal emulation program.
  • How to develop a library of PIC32 software to provide bi-directional communications of single characters and strings of characters.
  • How to use the UART for diagnostics and as a human-machine interface (HMI).
  • How to recognize the handshaking methods used in a communications protocol.
  • How to set up the Analog Discovery 2 to display communication signal waveforms.

 

 

Lab 4a

 

You will call on your experience with controlling a stepper motor from Lab 2a, only this time the motor will be controlled from a PC terminal via UART. Serial communications will be displayed on both the PC terminal using a terminal emulation program and the LCD onboard the Basys MX3Basys MX3.

 

Lab 4b

 

Lab 4b requires all of the elements of software code developed and hardware used in previous labs. The learner will extend the knowledge gained in Lab 4a by specifying a system that is capable of two independent control and monitoring locations, which is common to many industrial applications.

 

Lab 4c

 

You will develop a software system that allows the PIC32MX370 to write an arbitrary number of 8-bit bytes to an arbitrary address location in the SPI flash memory device. The stored data must also be read back to determine if the data read matches the data written.

 

Lab 4d

 

Using I2C communications, you will be able to program the PIC32MX370 processor to periodically read the physical orientation data from the onboard 3-Axis accelerometer and display the information on a character LCD and send a text stream to a computer terminal.

 

 

Unit 5 - IrDA Communications Protocols

 

 

image

Schematic diagram of PIC32 connection to the onboard infrared module.

 

 

This unit demonstrates how to use interrupts and the core timer to decode two IrDA protocols, in an effort to teach approaches for decoding different IrDA protocols used for remote device control. The IrDA is the only implementation of wireless communications included in this coursework, as well as the only unit requiring the use of the Analog Discovery 2 (or similar instrument). Some of the key takeaways are:

 

  • Understanding of the basics of IrDA protocols.
  • Using instrumentation to characterize data streams.
  • Use processor external interrupts to decode signal timing patterns.
  • Approaches to using state machines to process data.

 

 

 

Lab 5a

 

The format of this lab differs from the rest in this series in that the hardware is not entirely specified. You are intended to use an IR remote control device of your own choosing and to analyze the IrDA signal to generate an application that can exchange IrDA messages with that device.

 

 

Unit 6 - Analog IO and Process Control

 

image

Example motor and tachometer wiring for Unit 6 (use of the Analog Discovery 2 is recommended but not required).

 

 

 

Unit 6 will teach you how to work with analog signals. The purpose of this unit is to investigate applications of embedded controllers to real-time control algorithms that employ analog inputs and analog outputs. You will use a computer algorithm to implement a closed-loop processor for motor speed control and see how feedback can be used to linearize an inherently nonlinear process and result in zero steady-state control error. Some of the key takeaways are:

 

  • How to read analog voltage with a PIC32 processor.
  • How to use the PIC32 Output Compare to implement a PWM analog output.
  • How to use the PIC32 Input Capture period measurement to implement a tachometer.
  • The advantages of using period measurements as opposed to frequency measurements and vice versa.
  • Fundamental digital filtering concepts for data smoothing.
  • Open-loop and closed-loop process control.

 

 

Lab 6a 

 

This lab focuses on open-loop control. You will use the potentiometer labeled Analog Control Input onboard the Basys MX3Basys MX3 to set the percent PWM to operate the speed of the motor from 0 rpm to the maximum the motor can achieve given the motor performance and the supply voltage.

 

Lab 6b

 

Building upon Lab 6a, Lab 6b introduces closed-loop control by implementing a digital PI controller. The tachometer frequency will be measured by using the Input Capture of the PIC32 to determine the signal period which is then inverted to yield the frequency.

 

 

Unit 7 - Digital signal processing (DSP)

image

Plot of outputs of the four example filters to a 1 kHz input sine wave used in Unit 7.

 

 

This unit focuses on processing signals in the audio frequency range using digital signal processing (DSP) concepts with the PIC32MX370 microprocessor. Both a method of generating multiple frequency signals without using transcendental functions or lookup tables and Discrete Fourier Transforms (DFT) to detect the presence of signals will be used. It is not the purpose of this unit to teach you the theory of digital filtering, but rather to teach how to implement digital filtering using a conventional microprocessor in lieu of specialized digital signal processors. Some of the key takeaways are:

 

  • How to implement digital filters in C using a PIC32 microprocessor.
  • How to create analog output using pulse-width modulation.
  • How to sample an analog input at a specified rate.
  • How to use the PIC32 processor to make a signal generator.
  • How to use the PIC32 processor to make a real-time frequency spectrum analyzer.

 

 

Lab 7a

 

This lab requires much of the code written for previously labs and adds use of the onboard speaker and microphone. You will be able to create a digital sine wave generator capable of synthesizing eight constant amplitude signals at specified frequencies. The frequency of the sine waves will be selected by setting one of the eight slide switches. The audible output will be enabled and the frequency displayed on the 4-digit 7-segment display for five seconds when BTND is pressed. The LCD will display the frequency of the selected sine wave.

 

 

Lab 7b

 

Adding to Lab 7a, the lab series culminates in creating a spectrum analyzer using the Discrete Fourier Transform. You will experience how to use of the Fast Fourier Transform and MIPS DSP library greatly reduces execution time.

  • Sign in to reply
  • clem57
    clem57 over 6 years ago

    Great labs for this device. Thanks for posting

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube