IR for robot on 16F877A


Results 1 to 15 of 15

Threaded View

  1. #1
    Samuel's Avatar
    Samuel Guest

    Default IR for robot on 16F877A

    My robot is travelling along a narrow coridoor. At the point where it has to turn into a room, i want to have an IR transmission @38KHz. I got the IS1U60 IR reciever (by Sharp?) that detects IR only @ this frequency. I'm planning to mount the reciever on the side of my robot.

    My detector output will remain High and when it detects the IR @ 38KHz, it will go Low. So basically my robot will be going forward, and as soon as the detector goes low, the robot has to make the turn.

    I have two methods in mind and not sure which would be work best.

    1. Connect the detector output to portb (pins 4-7) and Use an interrupt (portb<4:7> change). So the 'forward routine' of the robot is interrupted and made to go into a 'turn routine'.

    (Also note portb0,1,2,3 are connected to my hbridge for my motors and i'm also using a bumper switch (interrupt) on portb.5. This setup works perfectly so far.)


    -OR-

    2. During my 'forward routine, just use an IF loop to keep checking if my detector is high or low?

    In the second case do i HAVE to use ADCON? and if i DO use ADCON, will I HAVE to connect my detector to port RA or RE? Or can i still use port RB? (VCC for my detector and PIC is 5V)


    Thanks,
    Samuel
    Last edited by Samuel; - 31st March 2005 at 21:42.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. Plz help in completing RC-5 IR remote lamp dimmer project
    By vu2iia in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd April 2008, 08:44
  3. PIC10F200 Automated IR Light Switch
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 3rd May 2007, 11:40
  4. Clock connection to DS1802 from 16F877A
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2006, 18:52
  5. how to get pic to pic communication
    By kinsiro in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th August 2005, 17:12

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts