Quote Originally Posted by Techbuilder View Post
Thanks but it didn't work
When I programmed the chip and put it on there nothing happened
Was it because of my trisb?

Or is it because of how I connected my Sharp IC to my micro controller?
Techbuilder,

We need to see your circuit drawn as a schematic (schematic = 1000 words or 10 pictures)

First you should try to find out if you have a hardware or software problem.

Software = Fix code
Hardware = Fix hardware

Hardware:
You need to test each portion of your circuit as a module.

Disconnect the wire between the proximity detector and the PIC input pin.

Run the PIC with a push button input.
Put a 10k resistor from plus (+) to the input pin, connect a switch (or wire you can “make and break”) from the same pin to ground.
This simulates the proximity detector.
When you momentarily connect that input pin to ground, does your servo work?

Yes = Problem with the proximity detector or input connection.
No = Problem with the PIC code, PIC circuit or servo.

To just ask without some sort out of problems puts the burden on the person not needing the help.

-Adam-