12f675 to latch output while it does something else


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,562


    Did you find this post helpful? Yes | No

    Default Re: 12f675 to latch output while it does something else

    Hi,
    it seems it is not possible to have 2 outputs HIGH at the same time....? i tried to lite up 2 leds:
    Sounds like you're getting bit by the ever so clasic read-modify-write issue caused by not having analog functionallity on related pins turned off.
    Code:
    CMCON = 7   ' Turn off comparator on 12F675
    ANSEL = 0    ' None of the I/O connected to the ADC
    /Henrik.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,956


    Did you find this post helpful? Yes | No

    Default Re: 12f675 to latch output while it does something else

    What Henrik stated must be placed on top of your program.

    Try it and reply the results.

    Ioannis

  3. #3
    Join Date
    Apr 2014
    Location
    Petaling Jaya, Selangor MALAYSIA
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: 12f675 to latch output while it does something else

    Quote Originally Posted by Ioannis View Post
    What Henrik stated must be placed on top of your program.

    Try it and reply the results.

    Ioannis
    Ok will do that we are out of the office already, GMT +8 here. That will be the first thing I try on Monday. Will keep you posted. Thanks Philip. Have a great weekend guys

  4. #4
    Join Date
    Apr 2014
    Location
    Petaling Jaya, Selangor MALAYSIA
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: 12f675 to latch output while it does something else

    Thanks henrik, Ill try that on Monday. Have a great weekend..!

    Philip

  5. #5
    Join Date
    Apr 2014
    Location
    Petaling Jaya, Selangor MALAYSIA
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: 12f675 to latch output while it does something else

    Quote Originally Posted by HenrikOlsson View Post
    Hi,


    Sounds like you're getting bit by the ever so clasic read-modify-write issue caused by not having analog functionallity on related pins turned off.
    Code:
    CMCON = 7   ' Turn off comparator on 12F675
    ANSEL = 0    ' None of the I/O connected to the ADC
    /Henrik.

    Henrik, thanks a million, we managed to get it to work. Alto port 1 out does not light the led. It ok I already know why. I can't see how I missed out the config for comparator. Thanks again....!

  6. #6
    Join Date
    Apr 2014
    Location
    Petaling Jaya, Selangor MALAYSIA
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: 12f675 to latch output while it does something else

    Hi henrik, I seem to have lost A.0 & A.1 & A.3 as outputs....? I tried to swap the led around the port, but they won't light up.

    A.2 is the LED
    A.4 is the RELAY and
    A.5 is the Button

Similar Threads

  1. 12f675 GPIO Problem. No output on GPIO.2
    By tasmod in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd June 2014, 15:57
  2. Replies: 11
    Last Post: - 13th January 2013, 10:25
  3. How to latch an output for a pre-defined time
    By Dennis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 21st December 2009, 18:20
  4. 12F675 output dependency
    By Kristjan in forum General
    Replies: 4
    Last Post: - 5th May 2007, 00:44
  5. open drain output as digital output?
    By droptail in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th November 2006, 03:11

Members who have read this thread : 1

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

Tags for this Thread

Posting Permissions

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