input command (newbie question)


Results 1 to 3 of 3

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Hi kctan,

    Nothing wrong with the first example. Except there's no GOTO at the end to form a loop. (but you probably just missed it with the cut&paste) You might want to try it on a real chip, instead of a simulator.

    However, in the second example.
    Code:
    x=0
    while porta.0 =1 and x = 10
        portb.0 = 1
        x=x+1
    wend
    The "while" will never execute, because x = 10 will never be True.

    Also, the code shown would be for PicBasic Pro, Plain PicBasic doesn't have a "while" command.
    Last edited by Darrel Taylor; - 24th November 2005 at 00:02.
    DT

Similar Threads

  1. Question from New member A/D input 16f876
    By mbruno in forum General
    Replies: 2
    Last Post: - 26th January 2008, 14:52
  2. Remote PIC input question
    By Adrian in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st September 2007, 15:44
  3. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  4. PIC16F628A input question
    By yankee in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th January 2006, 03:35
  5. ER Clock input question
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th May 2004, 10:10

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