IF...THEN inside a Loop


Results 1 to 11 of 11

Threaded View

  1. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Bill,

    No idea what's wrong at this point.
    But I did run your program as is, no changes, on an 18F252.

    Works the same with either PBPW or PBPL.

    You can also do the same thing like this ...
    Code:
    for X = 0 to 239
      PORTB = DCD (X >> 6)
      pause 5
    next X
    Added:
    So that it only affects those 4 pins, you could do this ...
    Code:
    PORTB = (PORTB & $F0) | DCD (X >> 6)
    Last edited by Darrel Taylor; - 11th July 2009 at 04:12. Reason: Added:
    DT

Similar Threads

  1. Controlsystem for compact sporting (clay shooting)
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2009, 16:48
  2. Serin to Serin2 ??
    By Gixxer in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th January 2008, 03:56
  3. Serial Relays
    By tazntex in forum General
    Replies: 3
    Last Post: - 17th May 2007, 17:42
  4. newbie Q - edge detection?
    By RMCRAVEN in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 9th October 2006, 08:20
  5. Newbie question:
    By Izone in forum mel PIC BASIC
    Replies: 2
    Last Post: - 26th February 2006, 16:24

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