napierzaza Posted July 28, 2008 Report Posted July 28, 2008 Can someone explain the encoder table to me? It does not appear to have any significant definitions aside from the comment at the end of the line.DIN and DOUT both have table fields that define individual functions, so I can move them around and delete/comment out whatever I like. For the encoders it does not appear that I have that option. My problem is that in my custom setup I skip over the LFO and go for the envelope. I only have 5 shift registers but the encoders for the envelope are near the end of the line in SR 6 and 7. Should I just zero out the LFO stuff but keep it in the same order on the list? I'm not certain how the encoder identities are figure out by the compiler. ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; LFO rate ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; LFO depth ENC_ENTRY 4, 2, MIOS_ENC_MODE_DETENTED2 ; Filter CutOff ENC_ENTRY 4, 4, MIOS_ENC_MODE_DETENTED2 ; Filter Resonance ENC_ENTRY 5, 0, MIOS_ENC_MODE_DETENTED2 ; Env depth/assign #1 ENC_ENTRY 5, 2, MIOS_ENC_MODE_DETENTED2 ; Env attack/assign #2 ENC_ENTRY 5, 4, MIOS_ENC_MODE_DETENTED2 ; Env decay/assign #3 ENC_ENTRY 5, 6, MIOS_ENC_MODE_DETENTED2 ; Env sustain/assign #4 ENC_ENTRY 2, 6, MIOS_ENC_MODE_DETENTED2 ; Env release/assign #5 Quote
Wilba Posted July 28, 2008 Report Posted July 28, 2008 The order of the list is important - it's used to identify the encoder.Therefore, you don't change the order of this list, just assign your custom SR/pin values to the entry.I was going to recommend using "0, 0" for SR/pin, but looking at the ENC_ENTRY macro, it might not... ;; encoder entry structureENC_ENTRY MACRO sr, din_0, mode dw (mode << 8) | (din_0 + 8*(sr-1)) ENDM ENC_EOT MACRO dw 0xffff ENDM[/code]"0, 0" would turn "(din_0 + 8*(sr-1))" into -8... probably not handled gracefully elsewhere. Then again, maybe it is, I don't know.Something like "16, 0" would definitely work... you won't have a 16th DIN (plus "DEFAULT_SRIO_NUMBER" is default to 10 - state on the 16th DIN would never be shifted into the PIC anyway). Quote
napierzaza Posted July 28, 2008 Author Report Posted July 28, 2008 Okay, but DIN and DOUT can just have 0,0? One issue is that I'm using J5 as a DOUT, so I guess IT can't have a 0,0 to represent a null address, because 0,0 is the first pin of J5. Quote
Wilba Posted July 28, 2008 Report Posted July 28, 2008 Yeah you are right... use "16,0" instead for the DOUT table. Or, if you don't have any DOUT modules at all (no 74HC595) then any SR >= 1 would do. Quote
napierzaza Posted July 29, 2008 Author Report Posted July 29, 2008 Okay, cool. Thanks Wilba. I'm still trying to figure out these asm files. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.