|
技术交流 | 电路欣赏 | 工控天地 | 数字广电 | 通信技术 | 电源技术 | 测控之家 | EMC技术 | ARM技术 | EDA技术 | PCB技术 | 嵌入式系统 驱动编程 | 集成电路 | 器件替换 | 模拟技术 | 新手园地 | 单 片 机 | DSP技术 | MCU技术 | IC 设计 | IC 产业 | CAN-bus/DeviceNe |
关于MEGA128L的问题,在线等,急 |
作者:iamhit 栏目:单片机 |
小弟是个初学128的,现有一个小问题叫大家,怎么实现一个I/O口低位为地址线,高位为正常的I/O口啊,命令是怎么样的,谢谢大家 |
2楼: | >>参与讨论 |
作者: iamhit 于 2004/1/13 23:28:00 发布:
详细情况 我来说出我的定义阿 #define PIN8279C (*(volatile unsigned CHAR *)0xFFF1) 这是向8279些控制命令字,其中PA全部接到8279的数据端口D0~D7,PC口的低两位为单独的CTRL,SHIFT端,但是我现在想用PC口的高六位作为输出端口,请问各位大侠,我在软件中应该如何设置阿,谢谢 |
3楼: | >>参与讨论 |
作者: chenlei 于 2004/1/13 23:48:00 发布:
XMCRB,MCUCR两个寄存器查查手册。 |
4楼: | >>参与讨论 |
作者: cock 于 2004/1/13 23:50:00 发布:
看见把AVR与8255,8279放在一起的,气就不打一处来。 |
5楼: | >>参与讨论 |
作者: iamhit 于 2004/1/14 8:40:00 发布:
chenlei,谢谢啊,正点。楼上的也谢了, cock有什么感想,说给后来者的小弟我来听听啊,呵呵 |
6楼: | >>参与讨论 |
作者: zsmbj 于 2004/1/14 13:36:00 发布:
看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 |
7楼: | >>参与讨论 |
作者: iamhit 于 2004/1/14 16:44:00 发布:
zsmbj,谢谢哈,问题已经解决了,谢谢大家 这里热心的人这么多,我一定要好好把这个单片机学好,呵呵 |
|
|
免费注册为维库电子开发网会员,参与电子工程师社区讨论,点此进入 |
Copyright © 1998-2006 www.dzsc.com 浙ICP证030469号 |