ADDRESS LATCH ENABLE

I have a question that when ALE = 1, then address is latched .After that if we want to use the same bus for data purpose we disable ALE =0.My question is when ALE =0 then previous address(when ALE =1) remains on bus or not?If yes then before sending data on bus what should be done IN ORDER to have error free data?
Thanks in advance

Are we talking about the 2560 chip?

What latch IC are you using?

If it’s the 74xx373 then IIRC it’s transparent when LE is low, in which case the lower 8 address lines will not be stable.

Maybe you should tell us what you are trying to achieve because this is sounding like a very dodgy thing to be doing.

yes i am using arduino 2560 only.
when ALE is HIGH …the address on bus is latched
but when it gets low,in order to read/write data then the previous address on bus will it be staying on bus or not?

Can you answer my second question?

Its too complicated.
I am replacing DS89C420 micro controller with Arduino mega 2560 on Profi Communication controller Card.
In that arduino is interacting with the SRAM(CY6264).

My second question was...

What latch IC are you using?

D TYPE LATCH 74LS373

With that chip the A0-7 signals will stay latched once you lower LE, so you are good in that regard.

Why are you doing this, are you desperate for another 8 outputs?

MY ADDRESS bus is 12 bit long.i need to use 4 OF THESE MULTIPLEXED pins.Any other way of doing that?

IIRC if you set up the ports for external memory access you can no longer use them for GPIO, so unless you plan to constantly swap the function of those ports around I'm not sure this can work very well.

All in all this sounds like a bodge job unless there are extenuating conditions we are not privy to.

.i need to use 4 OF THESE MULTIPLEXED pins

Do you just need 4 extra IO pins?

Can you PLEASE tell us what you need to do, not how you think the best way to do it is.

how to read an address of 12 bit.?

how to use IO lines of arduino as Bidirectional lines..?

Abhas123_S-tar:
how to read an address of 12 bit.?

how to use IO lines of arduino as Bidirectional lines…?

If the pins are random then something like this (this should answer both questions)

int address_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10 , 11, 12}; //use the real pin numbers
                                      // A11 first through to A0 last
int address = 0;

void setup() {
  // put your setup code here, to run once:

  // set all address pins to inputs
  for (int i = 0; i < 12; i++) {
      pinMode(address_pins[i], INPUT);
  }

  // read all 12 address pins and accumulate into a single variable
  for (int i = 0; i < 12; i++) {
      address |= digitalRead(address_pins[i]);
      address <= 1;
  }

  // set all address pins to outputs
  for (int i = 0; i < 12; i++) {
      pinMode(address_pins[i], OUTPUT);
  }
  
}

void loop() {
  // put your main code here, to run repeatedly:

}

Note that you don’t have access to A0-7 because they are on the other side of the 373 latch, so I don’t know how much use this code will be.