4.6.1.9 Emi Option
The -memi=mode
option allows you to select the
mode used by the external memory interface available on some PIC18 devices.
The interface can operate in a 16-bit word-write or byte-select mode; or in an 8-bit byte-write mode, and which are represented in the table below.
Mode | Operation |
---|---|
wordwrite |
16-bit word-write mode (default) |
byteselect |
16-bit byte-select mode |
bytewrite |
8-bit byte-write mode |
For example, the option -memi=bytewrite
will select the
8-bit byte-write mode.
The selected mode will affect the code generated when writing to the external data interface. In word write mode, dummy reads and writes can be added to ensure that an even number of bytes are always written. In byte-select or byte-write modes, dummy reads and writes are not generated and can result in more efficient code.
Note that this option does not pre-configure the device for the selected mode. Your device data sheet will indicate the settings required in your code.