SPI Flash Programming -- Byte Order

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

Hi everyone,

I'm programming a Gang-Programmer System, and I wonder one thing:

What is the low byte at the atmel avr (in other words: what endianess has the guy...)?

If you represent the flash-instruction word like this:

byte-address 0x0000 0x0001
BYTE_A BYTE_B

Is "BYTE_A" the low byte or the high byte?

Thanks a lot

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

AVR is little-endian. Here's a snippet of assemby code listing:

...
000035 e78f      	ldi	r24,0x7F
000036 bb82      	out	PORTD,acc
000037 e788      	ldi	r24,0x78	
000038 bb81      	out	DDRD,acc
...
0001ff 0608      	.db	0x08,0x06
...
00025e 74bf      	.dw	0x74BF

8F, 82, 88, 81, 08 and BF are the least significant bytes.

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

So I guess to answer your actual question, byte address 0x0000 (byte A) is the low byte and 0x0001 (byte B) is the high byte.

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

Thanks