IR Counter


Results 1 to 13 of 13

Thread: IR Counter

Threaded View

  1. #13
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Also, since the array elements are reset to zero at the top of the loop, you can simplify this...
    Code:
                if (PULSE_LENGTH > 90) then 
                    RF.0(i) = 1
                else
                    rf.0(i) = 0
                endif
    to this...
    Code:
                if (PULSE_LENGTH > 90) then 
                    RF.0(i) = 1
                endif
    And, while errors are less likely with IR, you can detect them buy adding RF[2] and RF[3]. They should always sum to 255 or $FF.
    Last edited by dhouston; - 3rd June 2009 at 12:40.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Replies: 17
    Last Post: - 12th April 2014, 02:17
  3. 20 Digit Virtual LED Counter
    By T.Jackson in forum Code Examples
    Replies: 9
    Last Post: - 19th November 2007, 05:02
  4. PIC10F200 Automated IR Light Switch
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 3rd May 2007, 11:40
  5. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27

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