chipKIT® Development Platform

Inspired by Arduino™

Digital inputs

Created Wed, 02 Apr 2014 07:21:09 +0000 by chaco


chaco

Wed, 02 Apr 2014 07:21:09 +0000

I'm trying to use pins 25 - 32 on the fubarino mini as digital inputs, but they aren't working. I've defined them via pinMode as inputs (along with pins 1, 2, 19, 22, 23, and 24, which are working fine). I didn't think I had to do any thing with PPS to just these pins as digital inputs, but perhaps I'm wrong.

Thanks for any suggestions...


majenko

Wed, 02 Apr 2014 10:21:08 +0000

I am not aware of having to do anything to use those pins, no. The only possible thing that might interfere with them is pins 25 and 26 are by default serial 1, so they may be switched to that instead of GPIO. The others should just work perfectly normally.

Do they work as outputs?


chaco

Mon, 07 Apr 2014 19:47:30 +0000

A quick update regarding my previous post -- I found the problem (a silly programming error). I did notice, however, that the doc "FubarinoMiniUserRefManual.pdf" includes pins 14, 15, 16, 23, 31, and 32 on the list of GPIO inputs. In the default setup, these pins are not usable, as they're allocated to OSC1 & OSC2, the PRG button, and USB. It seems like it would be a good idea to point this out in the manual.


EmbeddedMan

Tue, 08 Apr 2014 02:39:23 +0000

In the default configuration, they are not usable for exactly the reasons you state. However, they are all available if you need them. For example, some users may disable USB and the oscillator (using the internal one instead), and then they'd get back 5 GPIOs from that change.

Or some people would be fine with using the PRG button as an input pin.

In the default configuration, you are absolutely right - they are not available as GPIO. And updating the manual to make this clear is an excellent idea, which I will take care of right away. Thanks so much for the feedback.

*Brian


EmbeddedMan

Tue, 08 Apr 2014 03:08:50 +0000

OK, the documentation has been updated to make this fact more clear.

Note that the main pin usage table already indicated that these pins were in use.

I added text to the diagram and the text to say the same thing and make it easier to notice.

*Brian


chaco

Mon, 14 Apr 2014 17:33:51 +0000

Hi Brian -- Thanks for adding those details to the graphic overview of the pin usage. That will help my students in the future. (I did ultimately find the details in the pin usage table.)