Board logo

标题: 关于S12XE系列中全程寄存器GPage的使用 [打印本页]

作者: fox_best    时间: 2009-12-17 22:08     标题: 关于S12XE系列中全程寄存器GPage的使用

现在想用 GPage将S12XEP100的所有分页地址统一编址,苦于找不到什么资料,望高手指点,或者有无相应的例子程序。
在工程中GPage应该如何使用?
在使用GPage后,这时的3个字节的地址和原来的2个字节的地址是什么对应关系?望斑竹和高手帮我解惑!
作者: Forrest_Can    时间: 2010-1-24 10:16

我这有资料  QQ:625653223
作者: whc1223    时间: 2010-1-25 15:06

好像只能用特定的指令访问

HCS 12X has a complete set of Load & Store instructions to allow the 7 bit global address register to form a 23 bit global address:
GLDAA,GLDAB,GLDD,GLDX,GLDY,GLDS,GSTAA,GSTAB,GSTD,GSTX,
GSTY,GSTS

If such an instruction is executed the address is concatenated from the new 7-Bit GPAGE register + standard 16Bit address

23Bit address = {7-Bit GPAGE, 16 Bit address}
作者: whc1223    时间: 2010-1-25 15:07

The upper byte of the 23-bit global address must be written to GPAGE in order to display the corresponding 64K region of the global memory map.

Example: Writing 7E to GPAGE will result in the Global View Window displaying the contents of addresses 7E_0000 to 7E_FFFF.

Remember that ONLY special instructions can access the Global View Window. These are called Global instructions and have the form.

GLDxx and GSTxx
作者: whc1223    时间: 2010-1-25 15:09

LDX #0x5000 ;Set GPAGE offset to the value of 0x5000
MOVB #0x14, GPAGE ;Initialize GPAGE register with the value of 0x14
GLDAA X ;Load Accu A from the global address 0x14_5000




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0