共3条
1/1 1 跳转至页
MEGA128L 关于MEGA128L的问题,在线等,急

问
小弟是个初学128的,现有一个小问题叫大家,怎么实现一个I/O口低位为地址线,高位为正常的I/O口啊,命令是怎么样的,谢谢大家
答 1:
详细情况我来说出我的定义阿
#define PIN8279C (*(volatile unsigned char *)0xFFF1)
这是向8279些控制命令字,其中PA全部接到8279的数据端口D0~D7,PC口的低两位为单独的CTRL,SHIFT端,但是我现在想用PC口的高六位作为输出端口,请问各位大侠,我在软件中应该如何设置阿,谢谢 答 2: XMCRB,MCUCR两个寄存器查查手册。 答 3: 看见把AVR与8255,8279放在一起的,气就不打一处来。 答 4: chenlei,谢谢啊,正点。楼上的也谢了,cock有什么感想,说给后来者的小弟我来听听啊,呵呵 答 5: 看XMCRB寄存器,m128手册的P31。Bit 2..0 - XMM2, XMM1, XMM0: External Memory High Mask
When the External Memory is enabled, all Port C pins are default used for the high
address byte. If the full 60KB address space is not required to access the external memory,
some, or all, Port C pins CAN be released for normal Port Pin function as described
in Table 5. As described in “Using all 64KB Locations of External Memory” on page 32,
it is possible to use the XMMn bits to access all 64KB locations of the external memory.
Table 5. Port C Pins Released as Normal Port Pins when the External Memory is
Enabled
XMM2 XMM1 XMM0 # Bits for External Memory Address Released Port Pins
0 0 0 8 (Full 60 KB space) None
0 0 1 7 PC7
0 1 0 6 PC7 - PC6
0 1 1 5 PC7 - PC5
1 0 0 4 PC7 - PC4
1 0 1 3 PC7 - PC3
1 1 0 2 PC7 - PC2
1 1 1 No Address high bits Full Port C 答 6: zsmbj,谢谢哈,问题已经解决了,谢谢大家这里热心的人这么多,我一定要好好把这个单片机学好,呵呵
#define PIN8279C (*(volatile unsigned char *)0xFFF1)
这是向8279些控制命令字,其中PA全部接到8279的数据端口D0~D7,PC口的低两位为单独的CTRL,SHIFT端,但是我现在想用PC口的高六位作为输出端口,请问各位大侠,我在软件中应该如何设置阿,谢谢 答 2: XMCRB,MCUCR两个寄存器查查手册。 答 3: 看见把AVR与8255,8279放在一起的,气就不打一处来。 答 4: chenlei,谢谢啊,正点。楼上的也谢了,cock有什么感想,说给后来者的小弟我来听听啊,呵呵 答 5: 看XMCRB寄存器,m128手册的P31。Bit 2..0 - XMM2, XMM1, XMM0: External Memory High Mask
When the External Memory is enabled, all Port C pins are default used for the high
address byte. If the full 60KB address space is not required to access the external memory,
some, or all, Port C pins CAN be released for normal Port Pin function as described
in Table 5. As described in “Using all 64KB Locations of External Memory” on page 32,
it is possible to use the XMMn bits to access all 64KB locations of the external memory.
Table 5. Port C Pins Released as Normal Port Pins when the External Memory is
Enabled
XMM2 XMM1 XMM0 # Bits for External Memory Address Released Port Pins
0 0 0 8 (Full 60 KB space) None
0 0 1 7 PC7
0 1 0 6 PC7 - PC6
0 1 1 5 PC7 - PC5
1 0 0 4 PC7 - PC4
1 0 1 3 PC7 - PC3
1 1 0 2 PC7 - PC2
1 1 1 No Address high bits Full Port C 答 6: zsmbj,谢谢哈,问题已经解决了,谢谢大家这里热心的人这么多,我一定要好好把这个单片机学好,呵呵
共3条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 | |
【我踩过的那些坑】电感选型错误导致的处理器连接不上被打赏50分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏10分 | |
【我踩过的那些坑】DRC使用位置错误导致的问题被打赏100分 | |
我踩过的那些坑之混合OTL功放与落地音箱被打赏50分 |