Setting a pin twice


Closed Thread
Results 1 to 5 of 5
  1. #1
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest

    Default Setting a pin twice

    Is there something wrong with having this as code:

    Code:
    pause 500
    low PortA.0
    low PortA.1
             
    pause 500         
    high PortA.0
    low PortA.1
    
    pause 500         
    low PortA.0
    high PortA.1
    When I run this code where a pin set to the same value twice (A.1 is set low twice) A.1 never goes high when it is supposed to. Does setting a pin to a value disable it?

  2. #2
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest


    Did you find this post helpful? Yes | No

    Default

    I now seem to have a much deeper problem. The following code results in ONLY portA.1 being high:

    Code:
    DEFINE OSC 20
    high PortA.0
    high PortA.1
    end

  3. #3
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest


    Did you find this post helpful? Yes | No

    Talking

    Alright, never mind. I switched to PortB instead of PortA and all is good. I guess I just have a PIC with a messed up PortA.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    No! you have a PIC with 'features' on PORTA that must be disabled first!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    *Reads datasheet*
    Doh!

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 14:55
  2. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 15:01
  3. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 06:07
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 18:07

Members who have read this thread : 1

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