IF..THEN syntax


Closed Thread
Results 1 to 40 of 53

Thread: IF..THEN syntax

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    'Read Cds cell #1 on port b line 1
    'Read Cds cell #2 on port b line 7
    v1 var byte 'Variable v1 holds Cds #1 information
    v2 var byte 'Variable v2 holds Cds #2 information
    .................................................. ..........
    start:
    pot portb.2,255,v1
    pot portb.3,255,v2
    My guess is the values in v1 and v2 are are not as expected. Pot command can be a pain at times. Do you have anyway of sending these values to an LCD to debug?
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  2. #2
    Join Date
    Oct 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    With the current program, clearing the all PORTB pins and setting them all for output couldn't seem to work since portb.2 and portb.3 are used for storing the Cds values which serve as input. I've tried adding LOW PORTB.7 after each pulsout but it still doesn't work. About the LCD thing, I'll try it when I get to school since that is the only place where the LCD is available. I'll update you when I get the results.

  3. #3
    Join Date
    Oct 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    hmm..can anyone please tell me what command to send to a servo motor -- a modified one for continuous rotation-- in order for it to stop? Thanks!

  4. #4
    Join Date
    Oct 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Oh well! Howdy! I've finally figured it out. I've figured out how to stop the servo motor and adding a reverse functionality to it. Thanks for the help guys! Thanks very much for all the helpful post. More power to all!

Similar Threads

  1. Endless supply of 'syntax error's.
    By BitHead in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th December 2009, 20:21
  2. Replies: 0
    Last Post: - 1st September 2008, 07:03
  3. Math operations & Syntax?
    By kevj in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 23rd February 2008, 01:40
  4. Need help with I2C syntax problem?
    By Michael Wakileh in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th July 2007, 19:11
  5. Syntax error PIC16F684
    By milestag in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st September 2005, 18:54

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