Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] basic question (ATmega32)

Re: [AVR-Chat] basic question (ATmega32)

2005-02-11 by Jim Wagner

There are two address spaces. One is for IO and certain IO
instructions (such as "IN" and "OUT") work in that space.
The other is the general address space in which all
instructions work.

They give you both because every once in a while, there is
something you just can't do with an IO instruction and need
to access using a regular instruction; in that case you
need the global address of the register.

As to why this scheme was picked, I don't know.

Hope this helps
Jim

On Sat, 12 Feb 2005 13:08:35 +1300
 Eric <erichards@clear.net.nz> wrote:
> 
> 
> 
> 
> 
> 
> Here is one thing that upsets me 
> 
> The data direction register for port D is 0x11 (port
> address)&nbsp; but then they give 0x31 (RAM address)
> why is there a port address and ram address?
> 
> 
> 
> in the mean time I try and find out by RTFM.&nbsp;&nbsp; 
> 
> 
> From Eric
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> 
> 
> ADVERTISEMENT
> 
> document.write('');
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> To visit your group on the web, go
> to:http://groups.yahoo.com/group/AVR-Chat/&nbsp;
> To unsubscribe from this group, send an email
> to:AVR-Chat-unsubscribe@yahoogroups.com&nbsp;
> Your use of Yahoo! Groups is subject to the Yahoo! Terms
> of Service.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

basic question (ATmega32)

2005-02-12 by Eric

Here is one thing that upsets me 

The data direction register for port D is 0x11 (port address)  but then they give 0x31 (RAM address)
why is there a port address and ram address?



in the mean time I try and find out by RTFM.   


From Eric

Re: [AVR-Chat] basic question (ATmega32)

2005-02-12 by Dave VanHorn

At 07:08 PM 2/11/2005, Eric wrote:

>Here is one thing that upsets me
>
>The data direction register for port D is 0x11 (port address)  but then 
>they give 0x31 (RAM address)
>why is there a port address and ram address?
>

Because the I/O addresses also are present in ram space.
This allows you to address I/O as ram, and allows you to make some pretty 
ugly mistakes. :)
IMHO, I would prefer that this be a fuse bit setting, to turn this on or off.

On the larger devices, some of the I/O is only addressable through ram 
space, further complicating the picture.

Re: [AVR-Chat] basic question (ATmega32)

2005-02-12 by Eric

OK Jim, Dave 
Thank you for speedy reply, 


Eric   
Show quoted textHide quoted text
----- Original Message ----- 
From: "Jim Wagner" <jim_d_wagner@applelinks.net>
To: <AVR-Chat@yahoogroups.com>
Sent: Saturday, February 12, 2005 12:34 PM
Subject: Re: [AVR-Chat] basic question (ATmega32)




There are two address spaces. One is for IO and certain IO
instructions (such as "IN" and "OUT") work in that space.
The other is the general address space in which all
instructions work.

They give you both because every once in a while, there is
something you just can't do with an IO instruction and need
to access using a regular instruction; in that case you
need the global address of the register.

As to why this scheme was picked, I don't know.

Hope this helps
Jim

On Sat, 12 Feb 2005 13:08:35 +1300
 Eric <erichards@clear.net.nz> wrote:
> 
> 
> 
> 
> 
> 
> Here is one thing that upsets me 
> 
> The data direction register for port D is 0x11 (port
> address)&nbsp; but then they give 0x31 (RAM address)
> why is there a port address and ram address?
> 
> 
> 
> in the mean time I try and find out by RTFM.&nbsp;&nbsp; 
> 
> 
> From Eric
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> 
> 
> ADVERTISEMENT
> 
> document.write('');
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> To visit your group on the web, go
> to:http://groups.yahoo.com/group/AVR-Chat/&nbsp;
> To unsubscribe from this group, send an email
> to:AVR-Chat-unsubscribe@yahoogroups.com&nbsp;
> Your use of Yahoo! Groups is subject to the Yahoo! Terms
> of Service.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------


 
Yahoo! Groups Links

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.