[PD] Arduino+firmata - digital input (pull-up) - for Hans

Martin Peach martin.peach at sympatico.ca
Fri Apr 27 03:05:15 CEST 2007


Hans-Christoph Steiner wrote:
> On Apr 26, 2007, at 9:45 AM, João Miguel Pais wrote:
>
>   
>> Hello Hans and list,
>>
>> we're in the workshop with Sukandar in Berlin, and something  
>> strange just
>> happened. My arduino isn't the newest, it has with the ATMEGA8 chip  
>> (the
>> one we got in Zürich some time ago). I've put the latest firmata  
>> into it,
>> and the analogue stuff worked quite well.
>>
>>
>> While doing some digital inputting (just simple switches) a few things
>> happen:
>>
>> - the inputs/outputs don't match: if the switch is connected in the  
>> input
>> 2, it comes out from 5 (the same to all other inputs, although I  
>> didn't
>> mapped them). But consequently, if I switch the input 2 off, the  
>> output 5
>> switches off.
>> This doesn't happen on other participants who have the newest arduino
>> board.
>>
>> - someone here mentioned that the arduino has its own pull-up  
>> resistors.
>> but in the firmware they're switched off, and we found no  
>> possibility to
>> switch it in the arduino-test patch. so we must build our own pull-up
>> resistors in the circuit, outside.
>> is it possible with this firmata to activate the pull-up resistor in
>> arduino from the pd patch? if not, do you think you're going to  
>> implement
>> it? or could you tell just quickly how enable it?
>>     
>
> Hmm, I am still mostly working with the ATMEGA8 boards.  I am unaware  
> of a way to disable or enable pull-up resistors in the ATMEGA8/ 
> Arduino.  If such is a thing is a possibility, I would happily add it  
> to the Firmata firmware.
>
>   

In the atmega8, you activate the pull-up by writing a one to the port 
pin, as long as that pin is in input mode, and the PUD bit in SFIOR 
hasn't been set.
It has no bearing on the bit-scrambling, that sounds like an endian 
issue between versions of pduino code.

Martin





More information about the Pd-list mailing list