This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About P0 and P1

In my application with c167, I want to use PORT0 and PORT1 as general I/O , but it dosen't work. In my application ,I made the
pin EA keep a high level ,and in the code i
initialization the BUSSCON0 as 0 , then i used the ports , but i faild. pls help me ,
and sorry for my poor english! thank you !!

Parents Reply Children
  • The answer to your question comes back to reading the manual, DP1L is an Extended SFR (ESFR) so you need.

      extr #1
      bset DP1L.1
    

    P.S.
    The reason I asked which device you are using is because the C167 with internal Flash (since 2000) is no longer available (the XC167 is available with internal Flash). Given that you start in single chip mode means your program starts from internal ROM so how are you downloading a program in single chip mode (changing the ROM code is a good trick)? Are you using BSL mode?

  • Thank you Chris , thank you!

    you are right , the problem is that

    DP1L is an Extended SFR (ESFR) .