首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

normal expanded mode求助

normal expanded mode求助

请问版主,8位数据外扩设备如何访问设备的偶地址呀(在文档上看到外接8-bit外设时只有奇地址可见)!

采用s12xep100

康大侠何在?
感谢康大侠的热心!因为板子需要一个非易失时钟,选择的是ds1643(8位数据线,13位地址线)!有这方面经验的大侠们麻烦不吝赐教!!小弟在此谢过了!
strongchen大侠帮忙指点一下嘛!
只需要时钟,直接用IO口模拟时序嫌麻烦了!

我现在的现象是偶地址访问数据错误!strongchen大侠具体指点一下,硬件该怎么接,软件该怎么配置和访问!不胜感激!!

AN2708第9页

原文:

Interfacing to 8-bit Peripherals
The External Bus Interface is primarily designed to interface the MCU to 16-bit peripherals. However, with
certain limitations, it can also be used to interface to an 8-bit peripheral (for example, an LCD driver). In
this case, the HDBE bit in EBICTL0 register is cleared, only the lower half of the data bus is used, and the
LDS and UDS signals are not used by the external bus interface. Registers of the peripheral are then
visible on odd addresses only. The fact that the peripheral!ˉs registers are visible on every other address
in the memory space presents a problem only if the peripheral contains some sort of linear buffer. Such
a buffer would ideally be addressed by the application as a linear array of bytes. In this case two simple
workarounds exist:
?Make the array twice as big, and address only every other location in the array.
?Create the array as an array of words, rather than bytes, and ignore the upper byte of every word
in the array.
Both workarounds lead to a slight software overhead in the application, but this is relatively minor and can
usually be tolerated.

有些地方理解得不是很明白!请赐教!

www.freescale.com/files/microcontrollers/doc/app_note/AN2708.pdf

上面这个地址可以下载!

多谢strongchen指点!

那是否意味着外扩8bit外设时必须将ADDR1接外设的ADDR0,访问地址时先将待访问地址左移一位,再将最低位置1(保证为奇地址),这样就能访问所有的空间了!

不知道这样理解是否正确?

strongchen大侠能否提供相关的例子!多谢了!

返回列表