I purchased a board with the MC9S12DP512 & an Amtel AT45DB161D serial flash installed. In reading through the datasheet on the Amtel part I am very confused about the SRAM buffer addressing scheme. The datasheet states the buffer is written, via the SPI bus, with an 0x87 command and a 10 bit active address (padded with 14 don't cares). The active address range is listed as BFA9 through BFA0. I'm not quite sure how to get a 10 bits address out of this nor how to span a 528 bufffer space. According to my math, the actual address range only appears to be 4 bits (0-9 of the LSB). I'm also not sure where to append the remainig two bits to make it a 10 bit address.
Any help in deciphering the specific memory range for this chip would be greatly appreciated.
Hello,
I suspect that there is some confusion of the bit names given to the active bits, and the "address". The labels given to each of the active address bits range from BA9 through to BA0. This 10-bit value is right justified within a 24-bit address value. I assume that the 10-bit value will range from 0 to 527 decimal (0x20F).
Since the SPI data will be sent as individual bytes, the 10-bit value will need to be split into high and low byte values, to be sent as the third and fourth bytes, respectively.
Byte 1: Opcode 0x87
Byte 2: Don't care, say 0x00
Byte 3: address / 256 (high byte)
Byte 4: address % 256 (low byte)
Regards,
Mac