Sections
You are here: Home Forum Flash Controlling Pullup Resisitors

Controlling Pullup Resisitors

Up to Flash

Controlling Pullup Resisitors

Posted by Wade Burch at December 15. 2009

Another day, another challenge.

 

How do you turn on the pullup resistors from Flash?  I have attempted sending an OSC message.  It does not throw an error in mchelper but the io port is still defaulting to low.

 

mcflash.send("/io/56/pullup", [1] );

 

Re: Controlling Pullup Resisitors

Posted by Liam Staskawicz at December 15. 2009
That looks about right.  The pins will always default to low, since they're cleared by default.  You'll need to turn it on if you want to drive it high.

Re: Controlling Pullup Resisitors

Posted by Wade Burch at December 15. 2009

Interesting.  Mine are not defaulting low.  That is actually what I would prefer.  Instead I get some defaulting to low and some floating high.  Any ideas?

Re: Controlling Pullup Resisitors

Posted by Liam Staskawicz at December 15. 2009

Eh - I think I had in mind the firmware code I've been working on, which has not yet been released.  Sorry bout that.

Ideally the pins would be cleared on board startup - for now, maybe your best bet is to actively clear them in your application code.

Re: Controlling Pullup Resisitors

Posted by Wade Burch at December 15. 2009

I tried doing a manual reset of the pins when starting up my connection.  I used the following code for each pin.

 

mcflash.send("/io/pin#/active", [1] );

mcflash.send("/io/pin#/pullup", [0] );

 

I still have floating highs on about half of the io pins.  If I reverse the pullup setting to 1 there is no change in which pins are low and which are high.  

Re: Controlling Pullup Resisitors

Posted by Liam Staskawicz at December 16. 2009

You'll need to set the value to 0 or 1 to turn it on or off once it's active - /io/#/value 0 or /io/#/value 1

Re: Controlling Pullup Resisitors

Posted by Wade Burch at December 17. 2009

I am using these as inputs.  That would mean I should not set them to a value right?  I need them to pull down to zero unless my external input drives the pin high.  That is the way most boards with internal pull down resistors work.

Re: Controlling Pullup Resisitors

Posted by Fred de Guchteneire at March 06. 2010

You may have a look at my findings regarding the pull-ups for outputs

It is in the forum under hardware title : stepper and ethernet issues

Port 0 active 1 setting depends on toggling port 1 first before port 0 can be toggled.

 

Fred

 

Powered by Ploneboard
Document Actions