DMX Controller Using the UART with Protocol Support
Check out this project's MPLAB Xpress Webpage to view the complete code example along with a detailed step by step write-up and description, or visit the PIC18F25K42 Device Product Page for more information.
About this Code Example
The PIC18FxxK42 family has a new UART peripheral which supports several protocols like DMX512, DALI and LIN. This project shows the implementation of a DMX512 Controller on a K42 family device.
The PIC18FxxK42 family of devices also have a two channel Direct Memory Access (DMA) module. The DMA module has programmable start/end addresses, counters, triggers and interrupts. This gives the user great flexibility in using the core to attend critical tasks while the DMA moves chunks of data in the background.
In this example, we will use a custom board that was made to look like a DMX Controller. The schematics and other production files for this board can be found in the attachments below. The board houses a PIC18F46K42 and 2 seven-band graphic equalizer chips. These can be used to provide an audio input to the system and use the audio spectrum to control the lights connected in the DMX universe.
Figure-1: Image of the DMX controller board
Here are the setting used for the UART (DMX mode), SPI + CLC (to operate the LEDs). These settings were done using the Microchip Code Configurator - MCC. Open MCC to look at the settings of other modules like Timers etc.
- Nov 8, 2018