problem with toggle command


Results 1 to 7 of 7

Threaded View

  1. #4
    Join Date
    Sep 2016
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: problem with toggle command

    Thanks for the answers, that was it. The problem was that the ANSEL register was set to disable the digital input buffer, which caused all reads of that pin to return '0'. What threw me off was that I was thinking of the toggle command is an output function, & since the state of the ANSEL register has no affect on digital output functions, I thought I was OK with that setting. But toggle is really both an output & an input function in that it has to read the state of the pin to be able to change it to the opposite state.

    Actually, after considering what SUNFLOWER said, it's not obvious that the toggle command necessarily has to have an input (read) function to it, but evidently it does work that way.
    Last edited by INVTLG; - 3rd September 2016 at 18:11.

Similar Threads

  1. Toggle command question
    By AvionicsMaster1 in forum General
    Replies: 3
    Last Post: - 31st January 2012, 15:34
  2. Toggle command
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2011, 02:07
  3. problem with I2CWRITE command
    By hatzukitzuki in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th October 2010, 22:35
  4. toggle command w/ multiple switches
    By earltyso in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th February 2007, 17:47
  5. PIC16F88 problem with TOGGLE command?
    By russman613 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th September 2006, 23:31

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