chipKIT® Development Platform

Inspired by Arduino™

Does flashing a bootloader restrict pin usage?

Created Sun, 11 Oct 2015 05:07:47 +0000 by james.soober


james.soober

Sun, 11 Oct 2015 05:07:47 +0000

Hello,

Sorry for the horrible title. I'll try to keep this brief.

Right now, I'm about to buy a WiFire, to do prototyping for a college project I'm doing. In the late future, I'd like to eventually transfer the project on a single PCB. I know the PIC on the WiFire has 40 analog input pins. If I were to flash the bootloader on it, would I be able to use all of these pins for analog reading?

Thanks!


majenko

Sun, 11 Oct 2015 09:35:17 +0000

The bootloader only affects the operation of the UART pins and the LEDs - that is, the bootloader receives its data and instructions through the UART pins and flashes the LEDs to let you know what is going on. Once the bootloader is finished and it runs your program it returns control of all those back over to you.

Getting control of the pins that aren't currently available as analog inputs, though, is a completely different matter and unrelated to the bootloader.

The WiFire comes in two variants - one (old) with the EC chip on it, and one (new) with the EF chip on it. The ADCs in the two variants are very very different. The WiFire board variant contains files needed to control the two different ADC types - ECADC.c and EFADC.c - and they are custom to the layout of the WiFire board - that is they are hard coded to support just the pins that are routed as Analog Input pins on the WiFire boards. To make it more generic so you can use all the ADC input pins on the chip you would have to modify those files to support the pins you want. And those files are a little scary.


james.soober

Sun, 11 Oct 2015 19:11:48 +0000

OK, Thanks for pointing me in the right direction.

I'll do more research and see if I can come up with something useful when I get to that stage.

EDIT: Reading the errata on the EC chip is pretty, well, er.. you know.