PDA

View Full Version : Teensy as a controller for digital volume attenuator



Lil' Knight
12-11-2012, 03:18 AM
Hi guys,

I'm thinking of using the Teensy as a controller for my digital volume attenuator in my audio amplifier.

The plan is to use the Arduino uno, however I don't really like its size, the Teensy seems to be a much better choice...

Now, to the important point, I must admit I absolutely have no idea regarding the Arduino... first timer here. People who work on the attenuator project has written the code here to flash into the uno: http://www.head-case.org/forums/topic/9407-digital-attenuator/page-13#entry464519

So my question is, is it possible to flash that code into the teensy?

Thanks!

pixelk
12-11-2012, 05:40 PM
There are smaller flavors of Arduinos. The next thing to be aware of is the voltage needed by the device you are interfacing with. 5V ? 3.3V ?
5V => Teensy 2, 2++
3.3V => Teensy 3

Nantonos
12-11-2012, 09:59 PM
People who work on the attenuator project has written the code here to flash into the uno: http://www.head-case.org/forums/topic/9407-digital-attenuator/page-13#entry464519

So my question is, is it possible to flash that code into the teensy?

Thanks!

Yes, it looks like standard Arduino code using the Wire library, so that should work on Teensy.

PanMillenium
12-11-2012, 10:05 PM
yes it looks compatible.
I have made a volume control for Uno/teensy myself, and so far I have problem getting some "ploc" in the amp when switching the upper bits...

Lil' Knight
12-12-2012, 07:36 AM
Thanks guys! great to hear the teensy would do the work just fine. I really dig its tiny size.

So I suppose the teensy fully supports the Wire lib?

PaulStoffregen
12-12-2012, 10:27 AM
Yes, Teensy 2.0 and Teensy++ 2.0 fully support the Wire library.

On Teensy 3.0, the Wire library currently only works in master mode, which is the mode used by that example. Also, on 3.0 you must use external pullup resistors.

Lil' Knight
12-12-2012, 03:55 PM
Thanks, Paul.

Just put an order for the 2.0. Hopefully it work as expected :D