reading and writing

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

I want to read and write to/from the atmega8515 without using DDRx, PINx, PORTx. Is there any way to read and write without using those macro? Is there any possibility to have the base address & finding the complete address for all the ports?If yes, How to do we set the baseaddress? Anyother methods ?

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

Wrong forum, please read forum guidelines.

< Moved - Plons >

Regards,
Steve A.

The Board helps those that help themselves.

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

Quote:

Is there any possibility to have the base address & finding the complete address for all the ports

They are listed in a table at the end of every AVR datasheet. On tiny and mega they are fixed - while the Xmega has the capability to have often used registers mapped to low memory address so the fast SBI/CBI/IN/OUT opcodes can be used.

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

Quote:

I want to read and write to/from the atmega8515 without using DDRx, PINx, PORTx. Is there any way to read and write without using those macro?

Perhaps you could explain this need?

I guess if they are #defined the port names are indeed macros.

Are macros against your religion or something? I'm way confused. Or, is it as Cliff implied you intend to use the hard port address? Why?

Yes, I can indeed

Quote:

read and write without using those macro

I could use USART or SPI or I2C or ...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.