pullup resistors on sensor input pins

20 views
Skip to first unread message

brett

unread,
Jan 19, 2010, 5:18:36 PM1/19/10
to br-...@googlegroups.com
Sometimes it's nice having the internal pullup resistors set on the
input pins, such as when you're using a simple bumper switch, but
sometimes it messes things up, such as when you're trying to read an
analog voltage level. We've discussed keeping it as is, which is
sometimes handy & sometimes not, and removing them, which again is
sometimes handy & sometimes not, and we've also discussed having some
kind of initializing statement, which would solve the issue, but adds
complexity and requires the Blocos people to change their software. I
think there may be another solution. We already have two sensor input
commands, Switch and Sensor. What if we leave the pullups on by default
and the Switch command unchanged; Switch would act as a digital input.
Then change the firmware so that whenever it executes a Sensor read, it
first switches off the pullup resistor, performs the analog read, and
then switches the pullup resistor back on. This would give us digital
inputs via Switch, accurate analog measurements via Sensor, and even
allows the same pin to be read digitally or as analog within the same
user program. All of this with a relatively simple change in firmware
and requiring no changes in the programming environment software.

Will this work??


Brett

Lucas Tanure

unread,
Jan 20, 2010, 8:21:30 AM1/20/10
to br-...@googlegroups.com
Yes , will work. But I thing that we could leave the user decide which input to be a analogic ou digital.
It's easy to do, and it's the best choice.
I will consider making this change for the version 4.1 of Br-Gogo. I have to studdy this and test.

Lucas A. Tanure Alves
Equipe de Desenvolvimento Gogo Board Brasil
Skype : lucas.tanure
+55 (19) 88176559
Reply all
Reply to author
Forward
0 new messages