Multiple VS23S010 chips connected together.

Designing hardware and software that uses the VS23S0X0 family of ICs as a 8-bit or SPI SRAM memory or as a Video Controller for generating Composite Video (TV-Out) or driving other kinds of displays.
Post Reply
Hannu
VLSI Staff
Posts: 527
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Multiple VS23S010 chips connected together.

Post by Hannu »

Dear VS23S010 users,

As everyone who has read through the datasheet of VS23S010, knows that there are four pins to set the memory area which it operates. These are the XMDValue0, XMDValue1, XMDLast0 and XMDLast1 pins. These pins make possible to chain up to 4 devices together and create a 4 Mbit memory.

Normally when using single VS23S010, these pins are left unconnected so that the internal pull-up sets them to 1.

Now I'm sharing this documentation schematics to show how to design a circuit which can have 2 or 4 VS23S010 chips and the selection can be done in assembly time.
Attachments
vs23s_jumper_selection.pdf
Schematics showing how to select between 2 and 4 VS23S010 chips
(19.23 KiB) Downloaded 215 times
wfriedrich
Senior User
Posts: 31
Joined: Tue 2017-08-08 13:46

Re: Multiple VS23S010 chips connected together.

Post by wfriedrich »

Hello Hannu,
What would be the difference between this circuit and a VS23S040 chip? Could I use the same code to access either of those?
Thanks,
- Wolfgang.
Hannu
VLSI Staff
Posts: 527
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: Multiple VS23S010 chips connected together.

Post by Hannu »

Obviously there would be 4 chips in stead of one. If you have only two VS23S010 the memory size would be half and memory would wrap around earlier. From page 33 of the datasheet there is a table about this and the XMD* pin setups for all configurations.

But with 4 VS23S010 chips software can't tell the difference between them and VS23S040 in theory. In practice board layout can get harder.

There is simple and neat code in VS1005 SDSD23 driver code to detect the size. which I copied below.

Code: Select all

  for (i=4; i>0; i--) {
    sdTaskBuf[0] = i;
    sdTaskBuf[1] = 0xf4de;
    sdTaskBuf[2] = 0x17e3;
    WriteVS23S010(&byteBus, sdTaskBuf, i*(128L*1024)-512, 512);
  }
  vs23Size = 0;
  for (i=1; i<=4; i++) {
    ReadVS23S010(&byteBus, sdTaskBuf, i*(128L*1024)-512, 512);
    if (sdTaskBuf[0] == i && *((u_int32 *)(sdTaskBuf+1)) == 0x17e3f4de) {
      vs23Size = i*256;
    }
  }
wfriedrich
Senior User
Posts: 31
Joined: Tue 2017-08-08 13:46

Re: Multiple VS23S010 chips connected together.

Post by wfriedrich »

Thanks for confirming that there would be no difference for the software.
I have no trouble with the layout, my Arduino shield with the CS23S040 works flawlessly.

That "simple and neat" code is a handful to understand for a hardware person like me. :?
Hannu
VLSI Staff
Posts: 527
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: Multiple VS23S010 chips connected together.

Post by Hannu »

The directions of the loops are important.
First there is written the i variable and then comes the known value of so that the code knows it was written.

Code: Select all

0x7fe00 <- 4
0x5fe00 <- 3
0x3fe00 <- 2
0x1fe00 <- 1
And then the code reads back and finds these values.

Code: Select all

addr          4 chips     3 chips    2 chips  1 chips
0x1fe00       1           1          1        1
0x3fe00       2           2          2        1
0x5fe00       3           3          1        1
0x7fe00       4           1          2        1
Address bits 17,18 and XMD* pins determines which chip gets the data
And if the the other part of the if statement isn't true, there is no memory. Simple and neat how the overflow feature is used. :) Hopefully this helped with the detection part.

And naturally if you use only known amount of chips, you can hard code that and not probe.
wfriedrich
Senior User
Posts: 31
Joined: Tue 2017-08-08 13:46

Re: Multiple VS23S010 chips connected together.

Post by wfriedrich »

Thanks for the explanation. Now it all makes sense. :D
User avatar
Henrik
VLSI Staff
Posts: 1294
Joined: Tue 2010-06-22 14:10

Re: Multiple VS23S010 chips connected together.

Post by Henrik »

Hello!

Just a little additional comment which may further clarify things:
VS23S040 actually is four VS23S010 dies put into the same plastic package. That's why software cannot detect the difference between 4 correctly configured VS23S010's and a VS23S040.

Kind regards,
- Henrik
Good signatures never die. They just fade away.
Post Reply