Step 4Firmware
The firmware is based on the included code with in Microchip's AN1076. I enabled 6 AdC channels and cycle through them as they return data which is placed into Address variables, which waits to be sent.
Also added the ability to offset the start address, so instead of it always sending its first byte of data to DMX Address 1, the DIP switches can be used and set it to start at any of the addresses.
Unfortunately the only way I could implement it to work with all addresses was to use a method that produces choppy AdC results the higher the address is set to. But it works with all the addresses. Method 3
In the firmware, commented out, are two other methods to use the offset value.
Method 1: Allows the DIP switches 1 - 8 work correctly, which is DMX Addresses 1 - 255
Method 2: Allows DIP Switches 1-7 & 9 work correctly which is addresses 1-127 & 256 - 383
Method 3: Was discussed above.
Included in the ZIP on step 1 was the firmware with method's 1 & 2 commented out. And the HEX files for all 3 methods, ready to program.
A lot of PCB space can be saved by removing the offset functions, in the source code, remove all 3 of the methods and remove the "rcall OffsetAddress" and then the transmitter should always start sending at address 1.
If anyone can fix or find out a better way to implement it let me know. I have spent way to much time trying to figure it out, I have some comments on what I tried in the source code. It has to do with Indirect addressing.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|









































