共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年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
汽车+汽车电子电阻解释与分析被打赏5分 | |
分享汽车通信和多媒体总线结构被打赏20分 | |
【我踩过的那些坑】结构堵孔导致的喇叭无声问题被打赏50分 | |
NUCLEO-U083RC学习历程38+串口通过队列的方式输出两个字符串被打赏20分 | |
【我踩过的那些坑】分享一下调试一款AD芯片的遇到的“坑”被打赏50分 | |
电流检测模块MAX4080S被打赏10分 | |
【我踩过的那些坑】calloc和malloc错误使用导致跑飞问题排查被打赏50分 | |
分享电控悬架的结构与工作原理(一)被打赏20分 | |
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 |