Question for an Atmel Guru

16 views
Skip to first unread message

Mark Sullivan

unread,
Nov 10, 2012, 4:33:57 PM11/10/12
to txrx...@googlegroups.com

As I understand it, the Atmel 8 bit ATMEGA microcontrollers have a dedicated I/O address space from 0x20 to 0x5F.
Some of these addresses are physically wired to peripherals like timer registers, I/O ports, etc.
My question is, if an I/O space address is not associated with a peripheral, then can I use it as RAM or is it completely unimplemented?

For example, the ATMega8A I/O addresses 0x19, 0x1A, and 0x1B (aka data addresses 0x39, 0x3A, and 0x3B) are marked "reserved" in the data sheet. Can I use these locations as RAM?

My reason for asking is that I want to use the SBI and CBI instructions on some working variables and these instructions can only address the first 32 bytes of I/O space.

And, yes, I already know the data sheet says not to do this.

- Mark Sullivan -

Roland von Kurnatowski III

unread,
Nov 10, 2012, 10:48:28 PM11/10/12
to txrx...@googlegroups.com
 I have never tried it I always just assumed those addresses were reserved for a reason, sorry to not be of more help. My guess would be that you probably cant, mainly because even though it is marked as ram I dont think it actually is, I believe it is just all mapped into the same address space and hence that is reserved for future peripherals or expansion etc and hence doesnt actually exist now, but this is just a guess.

Please let me know if you find out.
Reply all
Reply to author
Forward
0 new messages