Skip to content

microchip-pic-avr-examples/pic16f18076-unique-identifier-mplab-melody

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCHP

Reading the Microchip Unique Identifier (MUI) on the PIC16 Family of Devices

This code example uses the memory driver generated with the MPLAB® Code Configurator (MCC) Melody library to read the MUI. The MUI is a unique number that is encoded individually during final manufacturing on every device. This allows for unique device tracking by the application manufacturer.

Related Documentation

Software Used

Hardware Used

Setup

The PIC16F18076 Curiosity Nano Development board is used as the test platform. This board has an onboard programmer/debugger and is equipped with a virtual serial port.

The following configurations must be made for this project:

Pin Configuration
RB4 UART TX pin
RA1 Digital output for LED
RA0 Digital input for Switch

MCC Settings


This application uses the Memory and UART drivers. The following screenshots illustrate the settings from MCC.

System and Clock Settings


Note: Considering the PIC16F18076 configuration settings, check if this step appears as optional. This step is implemented because the PIC default clock is set as an external clock, meaning that the device may not possess a clock on start-up.


Memory Module



UART Module



Operation

When the Curiosity Nano board is programmed, the firmware reads the MUI and stores it in an array. Every time the push button (SW0) is pressed, the MUI is printed on the UART which can be observed on the MPLAB Data Visualizer. The LED state toggles every time the push button is pressed for visual confirmation.


Summary

This project demonstrates how to read the MUI from the device's memory and display it using the UART module and the MPLAB Data Visualizer. The MUI is helpful with uniquely identifying the device in a given application.

About

Reading the Microchip Unique Identifier (MUI) on the PIC16 family of devices

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published