Axeslinger Posted November 10, 2005 Report Share Posted November 10, 2005 I've been figuring out how to implement some additional functions on my bass pedal unit -- which started life as the Floorboard. After adding the 13th pedal note, PORTD had three inputs left. One of those was used by my octave select function. The other two are reserved for additional functions I want to implement. So far, so good. I can do everything I have to do here. If I were to stop developing right now and start building, I'd have a pretty cool bass pedal controller.Unfortunately, I seem to never be satisfied. One success builds on another. It occurred to me that it would be cool if I had some ability to change the voicings on the NanoBass my pedal unit drives. Well, since this functionality is already there, this should be easy.  I could add another LED digit to display the preset number because there's room for one more anode output. Using one LED digit displaying in hex, I'd be able to implement 16 MIDI program change commands by stepping through them with a pushbutton the way I do with the octave selection.And there's where I could have a problem -- the pushbutton. I need one more input! Let's say that I wanted to use pin RC5 as my new input. Based on what I saw in the PIC datasheet and the Floorboard code, I would have to set TRISC (maybe PORTC also, I can't remember) to treat RC5 as an input. Then I would go through the usual stuff of adding RC5 to the shift register, adding code for C5_pressed and C5_released, and adding these modules to contab. I assume I would also have to have a pullup resistor for this pin. Finally, I'd need my pushbutton.Do I have this covered? Is there some reason I can't use pin RC5 as an input? Is there something I've missed? I swear, I did read the datasheet before I posted this.N.B. I think I mean C5. If I recall correctly, the TX and RX pins are the uppermost pins in PORTC. Quote Link to comment Share on other sites More sharing options...
TK. Posted November 10, 2005 Report Share Posted November 10, 2005 I don't know why which shouldn't work - you could output the read value of PORTC on your LED digit, just to check if anything changes.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Axeslinger Posted November 10, 2005 Author Report Share Posted November 10, 2005 I don't know why which shouldn't work - you could output the read value of PORTC on your LED digit, just to check if anything changes.Best Regards, Thorsten....which is exactly what I was planning to do. I was just proceeding carefully and trying to make sure I had done my homework properly before venturing into unknown territory. So far, everything I've done has just been a matter of building on code you already had in there or the little tricks I've added for button function processing. Quote Link to comment Share on other sites More sharing options...
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.