共2条
1/1 1 跳转至页
LPC2210,IO 求救:关于LPC2210的IO操作

问
我正在用LPC2210做小系统,使用IO口扩展出液晶数据接口,不管我使用P0口还是P2口的GPIO功能作为输出口接在液晶上时,每当对IO0DIR或者IO2DIR赋值,使相应IO口为输出时,在调试时出现预取指异常.但是在编译时没有提示出错,就是不能调试.请大侠指教!谢谢!急!
附加相关程序
#define P08 0x00000100
#define P09 0x00000200
#define P10 0x00000400
#define P11 0x00000800
#define P12 0x00001000
#define P13 0x00002000
#define P14 0x00004000
#define P15 0x00008000
PINSEL0 = 0x00000005;
PINSEL1 = 0x00000000;
IO0DIR = P08|P09|P10|P11|P12|P13|P14|P15;//添加该语句就调试出现异常
答 1: 调试时转到汇编页,看寄存器操作地址是否合理。
附加相关程序
#define P08 0x00000100
#define P09 0x00000200
#define P10 0x00000400
#define P11 0x00000800
#define P12 0x00001000
#define P13 0x00002000
#define P14 0x00004000
#define P15 0x00008000
PINSEL0 = 0x00000005;
PINSEL1 = 0x00000000;
IO0DIR = P08|P09|P10|P11|P12|P13|P14|P15;//添加该语句就调试出现异常
答 1: 调试时转到汇编页,看寄存器操作地址是否合理。
共2条
1/1 1 跳转至页