Auto Downloads


Closed Thread
Results 1 to 13 of 13

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi Tony,

    When you use the HIGH or LOW commands with numeric pin specifiers like 0,1,2,3 etc,, it starts from RB0, and continues on to RC7. With 0 being RB0 and 15 being RC7.

    Of course you can still use HIGH PORTB.0 too, but if you use the HIGH or LOW commands for port pins other than RB0 to RC7, then you can't use numeric pin specifiers.

    You would specify port pins like this -

    HIGH PORTA.0
    HIGH PORTA.1
    HIGH PORTD.1
    etc,,.

    If you specify an illegal bit # with one of these commands such as HIGH 16, PBP returns the error "illegal bit number".

    Using numeric pin specifiers like HIGH 0, LOW 0 rather than HIGH PORTB.0, LOW PORTB.0 comes in handy.

    Example;
    Code:
    X VAR BYTE
    
    MAIN: ' LED Light chaser on RB0 to RC7
        FOR X = 0 TO 15 ' Light LED's on RB0 to RC7
          HIGH X
          PAUSE 50
        NEXT X
        
        FOR X = 15 TO 0 STEP-1 ' Turn them back off
          LOW X
          PAUSE 50
        NEXT X
    
        GOTO MAIN
    Last edited by Bruce; - 24th September 2004 at 18:46.
    Regards,

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

Similar Threads

  1. How powering PIC in auto ?
    By fratello in forum Schematics
    Replies: 19
    Last Post: - 19th October 2009, 08:35
  2. auto recloser ELCB
    By badbaik in forum mel PIC BASIC
    Replies: 5
    Last Post: - 5th February 2009, 14:54
  3. AUTO baud rate detection FOR UART connection to PC
    By mike20200 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd September 2007, 01:56
  4. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 03:17
  5. Modem Auto Answer-Hanging for 1 min...
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd August 2005, 10:38

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