detecting switch release.


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: detecting switch release.

    Thank you for the responses. I now have a functioning routine and everything is working perfectly.

    On to the next issue: how to display text on an LCD from a word or byte.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: detecting switch release.

    Have you seen the LCDOUT command?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: detecting switch release.

    Yes sir I use it all the time.

    I am trying to display a couple of different messages depending on the values of 2 variables.

    This is exactly what I want to happen but I dont think you can store strings in variables like this. At least not in 2.60A.

    If Latch = 0 then LATCH1 = "MO"
    endif
    IF LATCH = 1 then
    LATCH1 = "MA"
    endif
    IF DIM = 0 then
    DIM1 = "OFF"
    endif
    IF DIM = 1 then
    DIM1 = "DIM 1"
    endif
    IF DIM = 2 then
    DIM1 = "DIM 2"
    endif
    IF DIM = 3 then
    DIM1 = "BOOST"
    endif

    LCDOUT $FE, 2 LATCH1, " ", DIM1

    I cannot put all the combinations into if then loops which include the LCDOUT routine as it takes too long to run through the loop and the timer does not update on the display every second. It actually updates every 3 seconds.
    Last edited by jmgelba; - 29th November 2012 at 13:50.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: detecting switch release.

    SELECT CASE
    Might help you out.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Toggle switch (latching switch) state
    By craigwb in forum General
    Replies: 4
    Last Post: - 6th November 2011, 14:18
  2. Replies: 6
    Last Post: - 9th January 2011, 15:26
  3. Detecting a pulse
    By Dennis in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 28th February 2010, 13:12
  4. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  5. Detecting EOF
    By Nicmus in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th January 2008, 13:26

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