Turn on LED when sonar detects using C

Discussion in 'Programmer's Corner' started by PANSONNIC, Feb 16, 2009.

  1. PANSONNIC

    Thread Starter Member

    Jan 4, 2009
    15
    0
    Hi,

    I have a SFR04 sonar device and I would like an L.E.D to turn on when the sonar detects an object and off when the object is gone. I have been trying to programme a PIC16F628 chip using C. I have got a PICdem2plus kit.
    I am a programming beginner so any help would be great
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Which C compiler are you using?
     
  3. PANSONNIC

    Thread Starter Member

    Jan 4, 2009
    15
    0
    I am using an MPLAB ICD 2 evaluation kit (DV164005), A PICDEM 2 plus demonstration board. I am hopeing to use C as the programming software.

    Thanks

    Pansonnic
     
  4. PANSONNIC

    Thread Starter Member

    Jan 4, 2009
    15
    0
    Thankyou for your reply, but I am still Struggleing to get it working. I know and understand how it works but, Im new to programming and am having difficulty writing the programme in C. Could any1 help

    Many Thanks
     
  5. LesterPhil

    Member

    Feb 25, 2009
    10
    0
    Is that project requires a C programing language or any will do? Because I'm a very good mikroC programmer. The sentax is just the same as the ansi C. and it has a library to be for future use.
     
  6. PANSONNIC

    Thread Starter Member

    Jan 4, 2009
    15
    0
    yes it does need C programming language. I am using the PICDEM 2plus kit from www.microchip.com. I am using the Sample PIC18F4520 that came with the kit now. Any help would be great.

    thanks

    Pansonnic
     
Loading...