Strange behavior on PORTB on a PIC18F26K20


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Strange behavior on PORTB on a PIC18F26K20

    And there are still digits missing where binary representation is used to set the registers, which can be quite confusing.

  2. #2
    Join Date
    Sep 2016
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Strange behavior on PORTB on a PIC18F26K20

    Quote Originally Posted by HenrikOlsson View Post
    And there are still digits missing where binary representation is used to set the registers, which can be quite confusing.
    If you're referring to the sets of 0's and 1's which would be immediately following the percentage sign, as a bank of 8 bits, there are 8 digits in the original code. I hadn't noticed that they got truncated to 6 digits in the paste... very interesting. Anyway yeah, that's another forum/paste glitch.

    Dos

    Code:
    TRISA     =    %00011111  ' Set 0-4 pins on PortA to inputs, 5-7 pins to outputs
    TRISB     =    %00000000  ' Set all pins on PortB to outputs
    TRISC   =   %00000000  ' Set all pins on PortC to outputs
    
    ANSEL  = %00000000  ' Make AN0 - AN7 Digital (pins RA0, RA1, RA2, RA3, RA5 on PIC18F26K20)
    ANSELH = %00000000  ' Make AN8 - AN15 Digital (pins RB2, RB3, RB1, RB4, RB0 on PIC18F26K20)

Similar Threads

  1. Strange Behavior 12F1822
    By nobner in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 3rd February 2012, 09:11
  2. Strange LCD Behavior
    By chips123 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st November 2009, 01:48
  3. Strange behavior - PORTG.2, 18F8720
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th January 2009, 00:30
  4. Strange electrical behavior with PIC16F684
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 28th March 2008, 07:58
  5. 12F629 Strange interupt behavior
    By BGreen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 25th May 2007, 16:35

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