Shop OBEX P1 Docs P2 Docs Learn Events
Programming Digital Potentiometer AD5220 — Parallax Forums

Programming Digital Potentiometer AD5220

HinkoHinko Posts: 1
edited 2005-01-31 22:09 in BASIC Stamp

roll.gif
Does anyone know how to code a digital pot so it will stay at one value and the debug window will TELL ME what that value is in OHMS?

I have a digital pot providing resistance to a 555 chip (like the exercise in the "What's a Microcontroller?" book). I am using the resultant resistance to drive the frequency of the output of the 555 into a transistor which goes out to a speaker.

I am using a set up similar to what's described in "The Microcontroller Application Cookbook" for Output: Speaker. Is it possible to control the frequency so I can control the tone?

PLEASE HELP!

THANKS.
Heidi

Comments

  • edited 2005-01-31 22:09
    It sounds like you are working out of an older verion of the What's a Microcontroller text. Download the latest version; it has some code that displays the tap setting (see pages 271-275).

    If you want to display the resistance, declare a new word variable, and set it equal to the tap setting multiplied by 78. For example:

    R VAR Word
    .
    .
    .
    R = newTapSetting * 78
    DEBUG "R = ", DEC R, "Ohms"

    What's a Microcontroller v2.2 (the latest) is available for free download from www.parallax.com -> Downloads -> Stamps in Class Tutorials.
Sign In or Register to comment.