What is memory mapped mode?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Friends

I should write code for drive MFRC500(Philips RFID) with ATMEGA16.

This chip is sell with working firmware written for c166 and use "memory mapped mode".

Now, the only one Address-Data Bus of MFRC500 is connect with the PortA of ATMEGA16.

Can be the address of this port the basic address of memory mapped mode?

Here the comment of original firmware:

* This library modul is written for a C166 microcontroller derivative.
* The source can be ported to other platforms very easily.
* In our case the reader module is
* connected via memory mapped io at base address 0x100000.
* The interrupt pin of the reader IC is assumed to be connected to
* the fast external interrupt pin INT0# (active low) and the reset
* pin of the reader IC should be connected to a dedicated port pin
* (Port: P1 Pin: 9).
* In this configuration, a reset of the reader module is independend
* from the reset of the microcontroller.
* All protocoll
* relevant timing constraints are generated
* by the internal timer of the reader module.


HERE PART OF CODE:
/////////////////////////////////////////////////////////////////

void WriteRawRC(int addr,char value)
{
*(gpcRCBaseAddress + addr) = value;
}

char ReadRawRC(int addr)
{
return (*(gpcRCBaseAddress + addr));
}

/////////////////////////////////////////////////////////////////

//#define WriteRawRC(addr,value) *(gpcRCBaseAddress + addr) = value;

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You will need to use a chip that has external ram support like the M8515, M64, M128 etc. The chip is then used as if it was ram.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Memory mapped is when you access peripherals and such in the same way as you access memory; for example instead of writing PORTA=0x11 and PORTB=0x12 you would write to the memory locations of those ports (*(0x10000000) = 0x11 and *(0x10000010) = 0x12 if the ports were mapped at address 0x10000000 and 0x10000010).
First hit on google: http://en.wikipedia.org/wiki/Mem...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In this case a full blown external bus isn't needed. It's just 8 datalines and 4 address lines with a few control lines. The bus can easily be emulated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Real nice general interest AVR question. Where were the required magic three letters (G-C-C) in this thread? I vote for a 'Wrong Forum' complaint.

Imagecraft compiler user