Automatic Gain Control C++code

Discussion in 'Programmer's Corner' started by chibuzorj, May 15, 2008.

  1. chibuzorj

    Thread Starter New Member

    May 15, 2008
    1
    0
    I am an analogue guy but i need to add a digital bit to my work, but i don't know how . I need c code to control the gain of my instrumentation amplifier through a programmable digital potentiometer with 128 gain steps using a PIC 16F877A. i need to send the output of the amplified signal of the instrumentation amplifier to a PC. I need help, cause all my colleagues are analogue inclined too.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    I'm not quite seeing the relationship between the digital pot, the PIC16F877A, the instrumentation amplifier and the Personal Computer. A schematic would certainly be helpful. As I understand it the PIC controls the digital pot, and uses one of its A/D converters to digitize the output of the amplifier and then sends the data to the PC. Do I have that right?
    A part number for the digital pot or a link to the datasheet would be handy.

    I'm guessing that the C code you will need is for the PIC. In order to get the job done you need to select a compiler. You should also become familiar with MPLAB, a free download from Microchip.
     
  3. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    I like C, but I have found that a lot of analog hardware type guys actually find it easier to write in assembly language especially with a PIC. As long as your application is not too complex, you should be able to learn that pretty quickly. The microchip website is a goldmine for this.
     
Loading...