共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 跳转至页
回复
我要赚赏金打赏帖 |
|
|---|---|
| 【S32DS】S32K3 RTD7.0.1 HSE 组件配置报错问题解决被打赏¥27元 | |
| 【S32K3XX】MCME 启动 CORE1被打赏¥23元 | |
| AG32VH407下温度大气压传感器及其检测被打赏¥20元 | |
| AG32VH407下光照强度传感器BH1750及其检测被打赏¥22元 | |
| AT32VH407下使用温湿度传感器DHT22进行检测被打赏¥20元 | |
| DIY一个婴儿澡盆温度计被打赏¥34元 | |
| 【FreeRtos】FreeRtos+MPU region 配置规则被打赏¥23元 | |
| 【分享开发笔记,赚取电动螺丝刀】三分钟快速上手驱动墨水屏(ArduinoIDE)被打赏¥28元 | |
| 【S32K3XX】LIN 通讯模块使用被打赏¥31元 | |
| 【FreeRtos】FreeRtos + MPU模块的配置使用被打赏¥32元 | |
我要赚赏金
