Use of HIGH and LOW for pin outputs


Results 1 to 8 of 8

Threaded View

  1. #4
    Join Date
    Aug 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Code

    Sorry, I didnt know how to use the Code: boxes but here is the "non-working" code:

    Code:
     
    DEFINE OSC 4 'Define for 4MHz crystal
    DEFINE LOADER_USED 1 ' Boot loader for ICSP
    '
    ' ***** Configure I/O ************************************************
    PORTC = %00000000
    TRISC = %00000000
    Rel1 var PORTC.0 ' Relay1 Transistor input
    Rel2 var PORTC.1 ' Relay2 Transistor input
    Rel3 var PORTC.2 ' Relay3 Transistor input
    Rel4 var PORTC.3 ' Relay4 Transistor input
    '
    Startup:
    Gosub TestRelay1
    END
    '
    TestRelay1:
    High Rel1
    Pause 1000
    High Rel2
    Pause 1000
    High Rel3
    Pause 1000
    High Rel4
    Pause 1000
    Low Rel1
    Pause 1000
    Low Rel2
    Pause 1000
    Low Rel3
    Pause 1000
    Low Rel4
    Pause 1000
    End
    Last edited by Acetronics2; - 27th January 2011 at 13:09.

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