Same code in different Pins


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Then you would change the PORTL and or PORTH assignments in the .bas file for the chip you are using.

    PORTL and PORTH determine which ports are used for "Pin Numbers".
    PORTL is 0-7
    PORTH is 8-15
    <br>
    Are you talking about the .bas file in the PBP directory?
    I would've thought the compiler would go nuts if you changed anything in those .bas files... I know you can change the .inc files....hmm... interesting thoughts brewing in my head now...
    Thanks a lot...now I got more crap to think about!

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


    Did you find this post helpful? Yes | No

    Default

    Yes, the .bas file in the PBP folder. ie. 16F877.BAS

    And, just like you do with the Config lines in the .inc file.
    You can comment out the PORTL/H and TRISL/H lines, which allows you to define them in your main program.

    Then you can...
    Code:
    PORTL   VAR     PORTA
    TRISL   VAR     TRISA
    PORTH   VAR     PORTD
    TRISH   VAR     TRISD
    Which puts 0-7 on PORTA, and 8-15 on PORTD.

    Or to whichever ports you wanted.
    DT

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Nokia COLOR LCD PicBasicPro 2.50a example code
    By skimask in forum Code Examples
    Replies: 49
    Last Post: - 28th September 2011, 01:43
  3. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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