I thought it was like riding a bike... Help please! 16f630 config


Results 1 to 5 of 5

Threaded View

  1. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: I thought it was like riding a bike... Help please! 16f630 config

    Shouldn't it be ADCON0=0? This will turn the comparators off. ADCON1=7 doesn't do anything.

    What I see is that none of your LEDs will turn off.

    If you want LED 1 on wait two seconds then off, then the same for LED 2, then LED 3 on stay on, LED 4 on stay on, then pause and all off it should look like:

    (Just the main program)

    RUN:
    high porta.1 ' led 1 on
    pause 2000
    low porta.1 'led 1 off
    pause 2000
    high porta.2 'led 2 on
    pause 2000
    low porta.2 'led2 off
    pause 2000
    high portc.0 'led3 on
    pause 2000
    high portc.1 'led4 on
    pause 2000
    low portc 'led3 and led4 off
    end

    Is this getting to more of what you want?
    There are more elegant ways to do this but this is the simplest to read.
    Last edited by AvionicsMaster1; - 9th February 2012 at 15:40. Reason: more clarification of adcon

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