activating i/o ports according to variable value


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    6


    Did you find this post helpful? Yes | No

    Smile High Low Vs 1/0 value

    Well that's great news - I will try the new code tonight assigning binary values as opposed to using the 'high' or 'low' statements.

    Here is the test code I was using:

    device = 16f628a
    x var byte
    loop:
    for x=0 to 5
    high portb.(x)
    pause 500
    low portb.(x)
    pause 500
    next x
    goto loop

    and here is the error message:

    Error at line [9] in file [84test.bas] ***Unrecognised characters '(x)'! ***
    Error at line [11] in file [84test.bas] ***Unrecognised characters '(x)'! ***

    Hopefully assigning a value will work...I'll try it out in about 3 hours when I get the kids to bed and I'm sensing a breakthrough here

  2. #2
    Join Date
    Jul 2010
    Posts
    6


    Did you find this post helpful? Yes | No

    Unhappy oh no

    Still no joy. Now I get a missing operator '=' error at both the lines where I assign portvalues.. sorry about not posting code however my programming terminal has no net access and I forgot to put it into my flashdrive.)

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Cut & paste the example in post #9. It definitely works. And I would avoid the use of loop as a lable since this is a reserved word in version 2.6 and up.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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