共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网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
vscode+cmake搭建雅特力AT32L021开发环境被打赏30分 | |
【换取逻辑分析仪】自制底板并驱动ArduinoNanoRP2040ConnectLCD扩展板被打赏47分 | |
【分享评测,赢取加热台】RISC-V GCC 内嵌汇编使用被打赏38分 | |
【换取逻辑分析仪】-基于ADI单片机MAX78000的简易MP3音乐播放器被打赏48分 | |
我想要一部加热台+树莓派PICO驱动AHT10被打赏38分 | |
【换取逻辑分析仪】-硬件SPI驱动OLED屏幕被打赏36分 | |
换逻辑分析仪+上下拉与多路选择器被打赏29分 | |
Let'sdo第3期任务合集被打赏50分 | |
换逻辑分析仪+Verilog三态门被打赏27分 | |
换逻辑分析仪+Verilog多输出门被打赏24分 |