If you're trying to do that, it typically means you're running an IR LED, and using a IR receiver, correct?
I used to worry about that, but then I found this cool new sensor, which I used on my near-IR sensor on Seeker 2, my autonomous mini-sumo. It is like the standard 3-pin IR sensor, except it has a 4th pin, which is PWM at 38 KHz with a 50% duty cycle...
The Sharp IS471F is the sensor in question - I have a picture of my entire near-ir sensor here: http://www.huv.com/near-ir.jpg
- Jon
Thanks for responding -
Yes - Its for basic obstacle avoidance - I will defiantly check out the sensor you talked about but the PCB I made has the IR Transmiter/Receiver built onto it - in the future I will avoid this mistake but its fairly important that I am able to get the board Ir pair up and running - I know its possible because I did it before - recently I did a system reinstall and lost all the source code - I am going to get flamed for this but normally I program the PICs with Pic Basic Pro (I know allot of people hate basic but its fine for what I am doing) To directly write to a register you -
{Register name} {Value to be written}
It says in the data sheet you write the first 8 MSB to the CCPR1L and the two LSB to the CCP1CON register
I found a useful tool called PIC Multi Calc -
http://www.mister-e.org/pages/utilitiespag.html My main issue is that I'm not sure what exactly to write to these two registers - Pic Multi Calc says to write 264 to the duty register but I don't know how to enter that in correctly into the two registers - My calculator says in binary its 1000010000 but it still leaves the question of what gets entered where.
Thanks -