Closed mplewis closed 11 years ago
That's a good idea. We have a prototype board designed already that has a 5-switch DIP switch on it. We're currently using all the pins for channel offset selection, but perhaps we could use 4 for channel selection and 1 for test mode?
We hit this lightly in #30 right here
Is it possible to change the 5-DIP to a 6-DIP to keep DMX512 support?
5 bits actually doesn't give us full flexibility either: we'd need 9 bits to place the start address anywhere in the DMX frame! However, we sacrifice a little flexibility on purpose (we don't like or have 9-bit DIP switches). We can then use the DIP switches in a few different ways. Ideas we've had so far:
0
s on the end of the DIP setting, possibly accepting frame overlap but allowing more flexible placement within the DMX frame.Since in our use case, we expect users to have only one animatronics controller, but possibly other DMX devices, it's more important that we be good citizens on the DMX universe and we chose the second option. 4 DIP switches allows us to place the frames in 32-channel increments, which has some overlap but should be okay. We don't really need 16-channel specificity in our intended use case!
Oh! I got off by a couple of powers of 2. Of course 2^5 != 512. Thanks for the explanation of our DMX protocol.
No problem! There's a few ways to go about it, and I bet there's even more than we have here.
If we add a debug bit, what functions would it have?
Some ideas so far:
That sounds about right. Both of those are what I was thinking.
Could flipping the debug bit reconfigure the meaning of the LEDs, especially RB4
and RB5
?
To what?
According to the Hardware Docs, we have RB4
and RB5
as DMX input status LEDs.
I'm not sure if we'd want to reconfigure those for another purpose if we toggle a debug bit, but if we do need more output/visual confirmation, those two LEDs are the first ones we should touch.
Just curious: is there any way for us to tell the difference between a signal output failure on a servo and a failure of the actual servo besides hooking up another servo to the output port?
Just curious: is there any way for us to tell the difference between a signal output failure on a servo and a failure of the actual servo besides hooking up another servo to the output port?
There's no built-in feedback signal to the board that can verify servos are listening/responding, unless we add sensors ourselves (quadrature encoders, etc.) right now, we don't have those spec'd because the master controller is just sending out I2C commands to the boards that actually control the servos. The servo driver we have doesn't support feedback currently, so our master can't get them either.
As for the LEDs on HeadMaster anyway, we should probably use one for DMX and one for I2C (since those are basically our only two functions anyway) instead of both for DMX.
Looking at this, I don't know if we need specifically a debug mode, since we'll always be indicating our two systems' statuses— DMX and I2C. Am I mistaken?
I agree, unless there's something else we need to keep track of that we haven't thought of.
Agreed. :+1:
All righty! Next step: actually using LEDs.
After working on Light Show DMX boxes, I figured it might be nice to add some debug switches to the animatronic boards.
We had problems with troubleshooting exactly which boxes were working and to what capacity during Light Show. Having a series of DIP switches to boot a board into a predefined debug mode (test DMX I/O, test signal out, etc.) might help figure out what's wrong with a board without having to reflash it multiple times.