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 !!
MY CODE is as follows: bset P1L.1 bset DP1L.1 bset P6.7 BSET DP6.7 LGW: bclr P1L.1 NOP NOP NOP NOP BCLR P6.7 NOP NOP nop nop nop bset P1L.1 NOP NOP nop nop nop BSET P6_7 jmpr cc_UC ,LGW the same code with P1L.1 and P6.7 ,has different result , P6.7 works well , but P1l.1 doesn't work . sorry for my poor english!
Q: Can I ask if you are really using a C167 and not a XC167? A: the ports does not work .but thank you all the same. and some wonder why threads get off track? Erik
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
Thank you Chris , thank you! you are right , the problem is that DP1L is an Extended SFR (ESFR) .