![]() |
|
|||||||
| DMX DMX-512 theatrical lighting control |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
I've modified the firmware for JEC's DIY pixel to allow for programming of the DMX Address via the DMX Stream and saves it in the EEPROM. see the File Library in the 'Other' Section for full details. ** it is a first cut of the code. ** but it is fully functional. This may be useful for other projects involving a pic & DMX. regards, Stpehen.
__________________
no matter where you go, there you are. BB |
|
#2
|
|||
|
|||
|
Nice work. Looks great, and very well commented.
If you can spare the 10 instruction cycles... you could probably just add a simple Code:
btfsc RCSTA, FERR ;test for new break, or otherwise corrupted data
goto WOOPS
then somewhere after the receive code throw in : Code:
WOOPS: ; Jump point for when a framing error is detected while we're waiting for data
movf RCREG,W ; Discard the mangled packet and keep the buffer clear
goto dmxcapture ;recheck Skipcounter and get ready for the next packet...
I'm throwing similar code into my DMX receive routines, just so they know to go back to the beginning if they get confused at any point. Anyway. Great work! Keep hacking this stuff and pushing us beyond what we think we can do. Art |
|
#3
|
||||
|
||||
|
Is THIS the unit you're talking about???
|
|
#4
|
|||
|
|||
|
yes this it the one.
__________________
no matter where you go, there you are. BB |
|
#5
|
||||
|
||||
|
Awesome!
Do you plan to incorporate the 'woops' code snippet shown in this thread? If yes, I'll wait to download and burn this. I think we should try to keep one set of code that has all the improvements in it. Thanks again for sharing. Keep it up! |
|
#6
|
|||
|
|||
|
I'm ordering a few hundred new boards of the DIY 5 channel design in about a week.
It would cost me a few dollars extra to have new board files run, but I could add this self-programming pullup resistor to the board without much hassle. Worth it? |
|
#7
|
|||
|
|||
|
I think it would be a worthwhile addition.
Ron |
|
#8
|
|||
|
|||
|
Hi Jec,
and maybe remove the servo pins & replace with dmx programming, and may be a DMX termination header as well ? or keep servo 1 + 2 remove servo 3 make dmx program header. to UK: yes I'll add this section into the code, I'll post a new version, when I get a chance. regards, Stephen.
__________________
no matter where you go, there you are. BB Last edited by srm; 02-08-2009 at 12:11 AM. Reason: updated. |
|
#9
|
|||
|
|||
|
Hey all. I took a stab at adding the woops code to Stephen's work. I'm posting it here for him to test and make corrections to... I don't own any of JEC's pixels so my code additions are untested and should be treated as such until someone reports otherwise.
I did (not out of vanity, but out of assumption that I make mistakes) put my initials on each line I added so it should be easy to trace through. Basicly I check for a framing error in each receive loop after the RCIF flag gets set... if the framing error is detected I go to a WOOPS routine which clears the error, reloads the skipcounter variables then goes to waitforstart (since we've already detected a break, we skip that part of the receive code). Oh, and a side question! Stephen, did you avoid testing for a zero start code because you weren't getting one? In my dmx receive code (also based on the Microchip app note, adapted to 16F assembly instead of 18F) I tried checking for the start code and wasn't getting a zero there... I just changed the code to discard the first byte and moved along, putting it on my to be figured out later list. Just wondering if you had the same experience, or had another reason not to check if it was zero. EDIT: Just figured out that this part of the code came from JEC's original pixel code. Nevermind. Anyway. Wait for Stephen to confirm it's working before you adding the woops code to your pixels... or you could find yourself saying woops. :P Art Last edited by awhaley; 02-08-2009 at 08:08 PM. |
|
#10
|
|||
|
|||
|
I'll post a schematic and board layout later today if I can.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|