共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网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
【笔记】生成报错synthdesignERROR被打赏50分 | |
【STM32H7S78-DK评测】LTDC+DMA2D驱动RGBLCD屏幕被打赏50分 | |
【STM32H7S78-DK评测】Coremark基准测试被打赏50分 | |
【STM32H7S78-DK评测】浮点数计算性能测试被打赏50分 | |
【STM32H7S78-DK评测】Execute in place(XIP)模式学习笔记被打赏50分 | |
每周了解几个硬件知识+buckboost电路(五)被打赏10分 | |
【换取逻辑分析仪】RA8 PMU 模块功能寄存器功能说明被打赏20分 | |
野火启明6M5适配SPI被打赏20分 | |
NUCLEO-U083RC学习历程2-串口输出测试被打赏20分 | |
【笔记】STM32CUBEIDE的Noruletomaketarget编译问题被打赏50分 |