打印
[51单片机]

带片选复用EMIF读取外部XRAM数据问题

[复制链接]
465|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
yym86202|  楼主 | 2020-11-4 08:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 yym86202 于 2020-11-4 08:57 编辑

求大神指点,最近翻译一段汇编程序,使用的c8051f505单片机,汇编定义MOV  EMI0CF,    #09H                                                                                     MOV   EMI0TC,    #045H通过中断能读取到数据
                MOV                DPTR,#02001H
                MOVX        A,@DPTR
                JB        B.0,A1D19
                MOV        RMSB,A
我翻译成c以后,EMI0CF    = 0x09;                    //配置EMIF端口复用方式,带块选择的分片方式,<4k用内存,>4k用外存
                        EMI0TC    = 0x45;
if(BB0)
        {
                RLSB=XBYTE[0x2001];
                BB3=1;
        }为什么就读取不到数据呢?这种复用地址数据地址线还涉及到时序还是怎么的?求指点,其中EMI0CF的第4、3位定义为10介绍如下:
EMIF Operating Mode Select Bits.
00: Internal Only: MOVX accesses on-chip XRAM only. All effective addresses alias to
on-chip memory space
01: Split Mode without Bank Select: Accesses below the 4 kB boundary are directed
on-chip. Accesses above the 4 kB boundary are directed off-chip. 8-bit off-chip MOVX
operations use current contents of the Address high port latches to resolve the upper
address byte. To access off chip space, EMI0CN must be set to a page that is not contained
in the on-chip address space.
10: Split Mode with Bank Select: Accesses below the 4 kB boundary are directed onchip.
Accesses above the 4 kB boundary are directed off-chip. 8-bit off-chip MOVX
operations uses the contents of EMI0CN to determine the high-byte of the address.
11: External Only: MOVX accesses off-chip XRAM only. On-chip XRAM is not visible to the CPU.附件是c8051f500手册


C8051F50x-51x.pdf

9.4 MB

datasheet

使用特权

评论回复

相关帖子

沙发
ayb_ice| | 2020-11-5 15:27 | 只看该作者
这芯片有中文手册的

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

16

主题

81

帖子

0

粉丝