Troubleshooting the Floorboard

No problem.  The advice you’ve already given has been more than enough.  Besides,  there’s already a DELAY subroutine in there!

The subject says it all.  I am so pumped!

All I had to do was put in a call to the button debounce code.  No messing with interrupts, no delays, no fuss.  I called the debounce when the button was pressed, and also when it was released.  Rock-steady octave selection!  Works GREAT!

Mr.  Klose, as promised, I will write up and send you what I’ve done.  I have very little free time, however, so this will take me awhile because my primary concern is to get the board built and usable.  I figure you should expect a ZIP file from me containing my documentation around Christmas.

(Ladies and) Gentlemen, thanks for all the help!

It’s me again…  sorry.  I’ve been trying to incorporate one or two more input buttons into my Floorboard mutation.  I’ll have to use two pins on PORTC because that’s all that’s left.  I started by using C7 since that’s already set up as an input in TRISC.

I started off with the belief that I couldn’t add the C7 pin to the “shift register” formed by ports D and B since those ports were set up as all inputs and it appeared from the code that the button that was actually pressed or released was determined from the button pointer subscript.  I added code to check C7 if the subscript was greater than 16.  I was looking for a 1 on the pin.  To shorten a long story, C7 appeared as if it was being ignored.

Then I had what I thought was another brainstorm.  I added PORTC to the shift register processing.  I then set the button pressed and button released condition tables up so that the pressed and released subroutines for pins C0 through C6 did nothing.  The LED digits went crazy!  They just cycled through their possible values – over and over again!  The input buttons were ignored.

Does anyone have any suggestions for how to implement C7 and possibly C5 as inputs? I sure would appreciate it!

Thanks!

In short: C7 is configured as MIDI In, you can use it as common GPIO pin by removing the access to RCSTA in init.inc

Shift register processing: possibily the registers are not shifted often enough? Check the loop counter

Best Regards, Thorsten.

I tried to do this by commenting out the statement with the << before the reference to RCSTA.  This had no perceptible effect.  What you actually meant was to execute the statement, but substitute 0 for 1.  What I’m supposed to do is leave the TXSTA register alone, but disable RCSTA.  This will allow RC7 to be handled as a GPIO pin.  Is this correct?