Dwayne, Any special reason you just don't want to write directly to the TRISx=20 register? The old TRIS command was really only meant for the baseline=20 stuff, where 5 - 7 are ports A - C. Not being critical here, just curious. Bill On 3/6/2017 2:13 PM, Dwayne Reid wrote: > Hi there, Richard. > > I'll give this a try. > > I must confess: when I saw that the TRIS operands of 5..7 didn't > match up with the actual register addresses of 0x0C..0x0E, I stopped > and didn't give it a try. > > My code does things like: > > movlw b'0011001100' > tris RA > > where RA is defined as the address of port register RA > > The assembler complained that address 0x0C wasn't in the range of 5..7 > > I guess that what you are saying is that the TRIS operand doesn't > have to match the port register address. I'll give that a try. > > I'll let you know how the actual chip behaves. > > Many thanks! > > dwayne > > > At 02:23 AM 3/5/2017, Richard wrote: > >> Dwayne, >> >> I tried that with MPLAB IDE v8.85 (uses mpasmwin.exe v5.45) and it >> worked okay. >> >> The test code I used is: >> >> #include "p16f1782.inc" >> >> MOVLW B'00111000' ;Set RA<5:3> as inputs >> TRIS 5 ;set TRISA to value in W >> end >> >> Build was successful and simulator showed expected results. >> >> Richard > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .