Saving COUNTs?


Closed Thread
Results 1 to 11 of 11

Thread: Saving COUNTs?

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Arrati-
    Thank you for your help. Although it looks good, your program does strange things! With no input on RC.5(LOW), X1 is all over the place, 126,76,20,216, etc., while W1 remains zero.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Adding the IF statement fixed it, and all is good! Thank you, Arrati.

    Main:

    count PORTC.5, 1000, W1
    if W1 > 60 then
    X1 = X1+(w1-60)
    endif
    lcdout $fe,1, dec W1
    lcdout $fe,$c0, dec X1
    pause 10
    goto Main

Similar Threads

  1. ADC Max Impendance and Power saving
    By Michael Wakileh in forum Schematics
    Replies: 3
    Last Post: - 28th June 2009, 20:29
  2. 16F to 18F context saving differences
    By brittons in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st April 2007, 04:40
  3. FYI Daylight Saving Time in the U.S.
    By ccsparky in forum General
    Replies: 1
    Last Post: - 7th November 2005, 16:05
  4. Problem with saving to EEPROM...
    By Tear in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st July 2005, 01:10
  5. I think my interrupt is not saving context properly?
    By royly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th December 2004, 18:21

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