Thread: Programming MicroChip PicKit2 Automatic Gain Control

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    1

    Programming MicroChip PicKit2 Automatic Gain Control

    I have a project that I am working on where I need to program a Microchip Pickit2 with an inverting op-amp circuit, using a digital potentiometer.
    The program is required to take a voltage reading and adjust the gain of the digital pot to maintain the same voltage output.

    I am wondering how I would go about taking these voltage readings off of a specific pin on the chip using c programming?

    Any help at all would be useful

    Thank you,
    Devin

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    First thing off the bat would be to post this question in the relevant forums viz., microchip. Most of us in this board don't have the wherewithal for this kind of inquiry, but for starters, wire-up the different pieces together, write code in a microchip supplied IDE and finally burn it into the chip using a programmer.

  3. #3
    Registered User Jugurtha Hadjar's Avatar
    Join Date
    Mar 2012
    Location
    Algiers, Algeria.
    Posts
    3
    Hello,

    First, PICKit2 is the programmer, i.e: The device you use to transfer the finished program into the chip.

    Second: Microchip has a free IDE you can download which is called MPLAB (Not MATLAB). It has everything you need in order to get something up and running (editor, debugger, etc...). You can either use Assembly with MPASM or C with HI-TECH C (the latter contains limitations, but beginners don't even hit the ceiling, so it's a non-issue).

    Once you get that, you download PICKit2 software, I have got v2.61, plug your chip in the programmer which is connected through USB to your computer and transfer the .hex file (compiled code).

    For more information, you can hit internet fora which focus on this kind of things. I am personally a member of the following ones:

    Electronic Circuits Projects Diagrams Free

    Forum for Electronics

    All About Circuits : Free Electric Circuits Textbooks


    I am mostly active in the first one. You can look the "Microcontrollers" section which contains everything you need (i.e: A sticky to beginners with all the information, redundant questions, links to tutorials (both in Assembly and C which are great) )

    Of course, you'll have (you can't skip this) to read the datasheet and spend (long) hours figuring things out.

    Like every forum, in order to ask questions you must first know something about the thing you'll ask about, or nobody will answer you.. So it's good to have a well defined, specific question and doing some research about it first.


    All my best.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multithreading no performance gain?
    By cyberfish in forum C++ Programming
    Replies: 22
    Last Post: 12-30-2009, 01:47 PM
  2. Help Me A Gain
    By AHMED KHALAF in forum C Programming
    Replies: 1
    Last Post: 12-09-2004, 08:11 AM
  3. What USA lost and gain from the WAR against Iraq?
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 139
    Last Post: 05-20-2003, 09:51 PM
  4. how to gain privilege
    By Jaguar in forum Linux Programming
    Replies: 9
    Last Post: 04-06-2003, 02:30 PM
  5. Gain Administrator Right on NT4
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 01-09-2002, 12:31 PM

Tags for this Thread