Friends: I am using AT89C52 to control a chip utilizing 8051 interface (Bus compatible with 8051). Now the problem is how to set CS pin of that chip. My idea is using: 1) P2.0 NAND ALE of AT89C52. 2) P2.0 NAND with fixed 1 to set CS. Do you think which one is right? Thanks.
this might be easier to answer if "that chip" was identified. Erik
Why not simply use an address line e.g. A15 as the chip select? and dependent upon wether it is /CS (active low - most likely) or CS (active high) to enable the device reset/set A15 to a 0/1 (by setting DPTR to an appropriate value) so that a 'MOVX DPTR' will select the device. I assume it also has /RD and /WR that will also need to be wired up to allow you to read/write to the device?. Mark.
just a note: the 8255 is NOT an 8051 compatible chip. Erik
Thank you every one. Mark Hickman you are right that chip also need /RD and /WR for reading and Writing that chip. The datasheet of that chip suggest me use ALE NAND the port P2 for addressing that chip, but the figure on that sheet did not show me have to use ALE. So I am confused.
If you still need a little more help, what chip are you interfacing to? and do you have a link to a datasheet for it? and i will take a look at it to see if i can provide some insight. Mark.
what chip are you interfacing to I asked that a few days ago and got no answer. Evidently it is a secret. Erik