With some trial and error I've managed to edit the
firmata firmware to control the chip as attached here. On Arduino you can
only use digital pins 10,11,12 and 13 for SPI... slave
select, data out, data in and spiclock. Since Firmata uses pin 13 to
flash its version number there was a bit of jostling to sort out, removing
that command from the void setup section, because otherwise it continues to
print the version number constantly when you go into the
loop.
So now I have the AD5206 tutorial patch running
within Firmata, which is fun. It would be more
fun and potentially creative however to have the commands sent by PD...is
that very difficult to do? Any clues anybody?
Nick
I am unlikely to write software for that chip unless I have a use for it.
But a firmware supporting it sounds useful. Firmata is an Arduino library, so
the easiest route would probably make a dedicated firmware for that chip then
use the Firmata to handle the communications.
.hc
On Mar 5, 2008, at 4:43 AM, nick burge wrote:
I got my AD206 chip as a free sample from analog
devices
It would be great to have support within Firmata
for SPI - (serial peripheral interface) allowing control over this digital
potentiometer or other devices and sensors that work with that protocol when
connected to an arduino.
Could it possibly work to simply copy sections of
the code from the arduino tutorial into the firmata firmware , first the
definitions, then the void setup section and then the write_pot(0,0) command
to control the device into the loop section.? As you can tell I have little
idea how to do this.
Nick.
It would be possible to add support to Firmata for this, but it's not
currently there. I don't have any of these chips, any volunteers? Patches
welcome :D
.hc
On Feb 26, 2008, at 8:54 AM, nick burge wrote:
Dear PD list. I would like to be able to
control the AD5206 chip (a 6 channel digital potentiometer) from within
the Pduino object written by Hans-Christoph Steiner. The
idea comes from one of the tutorial exercises in the C++ arduino
program.
Is this
relatively simple to do, or simply
impossible? The aim in the long run
is to be able to be able to calibrate 6 force sensors remotely using the
digital potentiometers for an art installation
project.
I have got the
above mentioned tutorial project up
and running succesfully using the arduino program, and I am also able to
get Pduino communicating with the arduino quite happily on my Windows Vista system, but I would
imagine to have control over the the digital potentiometer device from within
PD would require a revision to the Firmata
firmware would it not? I would be most grateful for a
clue.
thank you for
your attention, sincerely, Nick Burge.
_______________________________________________
----------------------------------------------------------------------------
All information should be free. - the hacker ethic
----------------------------------------------------------------------------
Man has survived hitherto because he was too ignorant to know how to
realize his wishes. Now that he can realize them, he must either change them,
or perish. -William Carlos Williams
<Pd_firmware.txt>