Does flashing a bootloader restrict pin usage?

Talk about anything you want!
Post Reply
james.soober
Posts: 2
Joined: Sun Oct 11, 2015 5:51 am

Does flashing a bootloader restrict pin usage?

Post by james.soober » Sun Oct 11, 2015 6:07 am

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!

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Does flashing a bootloader restrict pin usage?

Post by majenko » Sun Oct 11, 2015 10:35 am

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.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

james.soober
Posts: 2
Joined: Sun Oct 11, 2015 5:51 am

Re: Does flashing a bootloader restrict pin usage?

Post by james.soober » Sun Oct 11, 2015 8:11 pm

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.

Post Reply