Help getting started with programming PIC Microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by ztjust, Jun 21, 2012.

  1. ztjust

    Thread Starter New Member

    Apr 1, 2012
    Hello, I'm trying to program a PIC16F87X microcontroller for distance measuring using a infrared sensor. Essentially I want to make a device that has a couple of LEDs, a display, a dial, and a sensor.

    Essentially I want to attach measure how far away I am from a wall. I want to attach the device to a tube or stick. I would go up to the wall and set a distance I want to travel before being alerted. So I'll set 20 inches or so. Then I would zero the measurement so it starts at zero. Also, a red LED is on telling me I'm not at my goal. When I reach 20 inches, a green LED will turn on saying I'm at the distance.

    I am somewhat new to programming so I was wondering if someone could help me out or point me in the right direction so I could teach myself.

    Thank you so much for any help.
  2. kingArgon


    Mar 20, 2011
    this is an ambitious project for a beginner. do you already have the supplies?
  3. BillO

    Distinguished Member

    Nov 24, 2008
    Do you want to measure along the wall or how far away from the wall?

    I don't think using IR would be a good method either way, but measuring distance along the wall would be very difficult. Also, measuring distance from the wall would only really work well (easily, that is) at close range.

    Have you thought of using sonar? Sonar sensors with all the logic built into them can be had for under $5. They are good for quite a few feet.