EmbeddedRelated.com
Forums

newbie question: Memory maped IO vs Port IO

Started by gt March 13, 2004
Could someone explain memory mapped IO and Port IO?
When should I use one or the other? why some devices
support port IO only?

thanks
gt
gt wrote:

>Could someone explain memory mapped IO and Port IO?
Some processors provide seperate address space for I/O. When they do, they have a control bus signals, in addition to read and write signals, that select whether the address bus currently holds a memory or a port address. These signals are driven according to the machine instructions being executed at the time.
>When should I use one or the other?
When a processor provides no seperate port addressing you have no choice. Otherwise, whether you use one or the other is a function of the hardware design.
> why some devices >support port IO only?
Processors come in a great many flavors, each with their own variations. Whether they provide seperate memory and port spaces is just one of those variations and is one of the many things to be considered when choosing a processor for an application. -- ======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mkesti@gv.net | - The Who, Bargain
On Fri, 12 Mar 2004 21:10:47 -0800, "Michael R. Kesti" <mkesti@gv.net>
wrote:
>>When should I use one or the other? >When a processor provides no seperate port addressing you have no choice. >Otherwise, whether you use one or the other is a function of the hardware >design.
I personally would prefer to use the io port selection for i/o. This keeps your data/program memory map clean. Pieter Hoeben
On 2004-03-19, Pieter Hoeben <hoebenNOSPAM@bigfoot.com> wrote:

>>When a processor provides no seperate port addressing you have >>no choice. Otherwise, whether you use one or the other is a >>function of the hardware design. > > I personally would prefer to use the io port selection for > i/o. This keeps your data/program memory map clean.
I prefer memory mapped I/O. It makes the software design much, much, cleaner. -- Grant Edwards grante Yow! My mind is making at ashtrays in Dayton.... visi.com
In article <405b6267$0$173$a1866201@newsreader.visi.com>,
Grant Edwards <grante@visi.com> wrote:
>On 2004-03-19, Pieter Hoeben <hoebenNOSPAM@bigfoot.com> wrote: > >>>When a processor provides no seperate port addressing you have >>>no choice. Otherwise, whether you use one or the other is a >>>function of the hardware design. >> >> I personally would prefer to use the io port selection for >> i/o. This keeps your data/program memory map clean. > >I prefer memory mapped I/O. It makes the software design much, >much, cleaner.
I don't like any I/O. On a machine with no I/O, nobody can show your program is working wrong. Regards. Mel.
> I don't like any I/O. On a machine with no I/O, nobody > can show your program is working wrong.
But it's hard to market. Users like to feel that they are interacting with the machine. I suggest a single input, wired to a pushbutton. The pushbutton can be fitted with removable, color-customizable caps to satisfy user decor requirements. And pressing the button can satisfy the user's need to feel in control.
larwe@larwe.com (Lewin A.R.W. Edwards) wrote in message news:<608b6569.0403201451.3b2af587@posting.google.com>...
> > I don't like any I/O. On a machine with no I/O, nobody > > can show your program is working wrong. > > But it's hard to market. Users like to feel that they are interacting > with the machine. I suggest a single input, wired to a pushbutton. The > pushbutton can be fitted with removable, color-customizable caps to > satisfy user decor requirements. And pressing the button can satisfy > the user's need to feel in control.
All you need to do is connect that button to an LED and a resistor. The user pushes the button, the light goes on. There's their control.
Geodanah@yahoo.com (George) writes:
> larwe@larwe.com (Lewin A.R.W. Edwards) wrote > > > I don't like any I/O. On a machine with no I/O, nobody > > > can show your program is working wrong. > > > > But it's hard to market. Users like to feel that they are interacting > > with the machine. I suggest a single input, wired to a pushbutton. The > > pushbutton can be fitted with removable, color-customizable caps to > > satisfy user decor requirements. And pressing the button can satisfy > > the user's need to feel in control. > > All you need to do is connect that button to an LED and a resistor. > The user pushes the button, the light goes on. There's their control.
Or you could produce the classical psychology demo by having the LED flash at random intervals unrelated to pushing the button.
On Sun, 21 Mar 2004 11:16:05 PST, mojaveg@mojaveg.iwvisp.com (Everett M. Greene)
wrote:

>Geodanah@yahoo.com (George) writes: >> larwe@larwe.com (Lewin A.R.W. Edwards) wrote >> > > I don't like any I/O. On a machine with no I/O, nobody >> > > can show your program is working wrong. >> > >> > But it's hard to market. Users like to feel that they are interacting >> > with the machine. I suggest a single input, wired to a pushbutton. The >> > pushbutton can be fitted with removable, color-customizable caps to >> > satisfy user decor requirements. And pressing the button can satisfy >> > the user's need to feel in control. >> >> All you need to do is connect that button to an LED and a resistor. >> The user pushes the button, the light goes on. There's their control. > >Or you could produce the classical psychology demo by >having the LED flash at random intervals unrelated to >pushing the button.
Your average laymen has lost interest in the blinking LED and now has advanced to the LCD display. As is evident in the popularity of the mp3 players with kewl startup graphics. Remove "HeadFromButt", before replying by email.