
Originally Posted by
HenrikOlsson
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)
Bookmarks