memory mapped I/O using RCM2200

Hi,

How to use Data bus (D0-D7) with Adderss lines(A0-A3), to access external data from peripheral devices using latches.

could you please suggest how to achieve this in the dynamic C.

Look at section 10 of the Rabbit 2000 users manual for an explanation of the I/O Bank Control Registers. There are 8 of these corresponding to the 8 pins on parallel port E. Since the RCM2200 only brings out 5 of these 8 pins onto the core module headers, you will be restricted to using one of these 5: IB0CR, IB1CR, IB4CR, IB5CR or IB7CR. These correspond to pins PE0, PE1, PE4, PE5 or PE7 respectively.

Select which PEx pin you want to use for your I/O strobe and setup the appropriate IBxCR register. Each of these registers has a 8KB address range assigned to it, so the PEx pin you choose sets your available addresses. Since only A0-A3 are brought out, you have 16 addresses that in essence repeat through the entire 8KB range. Once you enable the I/O space through setting up this register, whenever you issue a RdPortE or WrPortE call to an address in the 8KB range it will activate an I/O cycle on D[0:7], A[0:3], IORD, IOWR and the PEx strobe pin you setup.