原文: 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. 有些地方理解得不是很明白!请赐教! |