> Van: Markus Falkenau > Aan: PICLIST@MITVMA.MIT.EDU > Onderwerp: Problems with MPLAB > Datum: donderdag 2 december 1999 23:20 Hello Markus, > How can I clear the TRIS(A..E) registers of a 16F877 in MPLAB v4.12.00 ? I > already tried it with: > "clrf TRISA" and with > "movlw h'0' movwf TRISA". > These opcodes work perfectly with all kind of variables but not with the > TRIS(A...E) registers. The TRIS(A .. E) registers are not in the first FSR-bank. So, you will have to select the right FSR-bank, and than address the TRIS register. The FSR-bank select bits are in the Status-register (RP0 & RP1). If you do a "CLRF TRISA" , the result will (probably) be "CLRF PORTA" because PORTA is in the first FSR-Bank (Bank #0). Regards, Rudy Wieser