At 06:19 PM 2/09/98 -0500, you wrote: >Dennis thannk you very much for responding but I know you are suppose to set >some bit to get to the second bank, could you give me the code. I thought the >bsf STATUS, R0 was suppose to do that. What else am I suppose to be doing. >(please include command) > >Dennis Plunkett wrote: > >> At 05:41 PM 2/09/98 -0500, you wrote: >> >Instead of beating my head against the wall on something really, really >> >simple, I thought I would post my problem to the list. What am I >> >forgetting to do to Tris the a and b ports. See code and error messages >> >below. This is on MPLAB 3.4. >> >> 3/9/'98 >> >> Hello David, >> If you look into the Microchip data book, you will see that the TRISA and >> TRISB registers are in the second register bank, thus you have to set the >> upper register enable bits to get to them. The assembler is sending you a >> warning indicating that this may not have been done (You have to do it). If >> this becomes be annoying warning, then you can turn it off by setting the >> waning level to 302, but I suggest that you don't do this. >> >> Dennis > > > >-- > > Yes you are correct, set GP0 in the status register, and then use the nominal TRISA TRISB commands (I am not quite sure if these are the commands that Microchip don't recommend for future use, but this will just make your problem more difficult). The code sample provided did not set this bit, so do it, then write to the TRIS register required and clear the GP0 bit to get back to the first register bank. As for the warnings, ALWAYS check them, and only dismiss them when you are sure that they have no implications. This is a GOOD practice, this will then get you into the habit, especially for high level language compiler warnings. Dennis