??? 06/08/04 22:22 Read: times |
#72116 - RE: Using P0 for LCD along with 64K Ext. RAM Responding to: ???'s previous message |
Raj Shetgar said "I have planned to use 2 x 32k NVRAMs.
The problem is if I end up using 2 ports + RD + WR for accesing RAM, I am left with very few port pins. I need them for other purpose like buzzer, relay etc... " Raj ,a few points: 1)Why use AT89S8252,why not AT89C52 since for reasons of availability you decided use external RAMs so the FLASH is not going to be used anyway? 2)I ground External Enable /EA external memory access i.e Address 0000 starts from 0000 of device getting Y0 from '138.In this mode P0 time-multiplexes lower address and data.This lower addresed is latched out and fed as input to external RAMs,which get data input straight from P0.Thus for external memory access P0 and P2 (generating A8 to A15) are required. 3)That does not mean P0 and P2 pins cannot be used for any other intermittent control jobs like your buzzer and relay. 4)You are still left with P1 and P3 free. 5)The 16x2 LCD here can be I/O mapped not memory mapped like RAMs.Although you have not mentioned your crystal frequency,it will not be dependable to memory map character LCDs which are slow.I would have used 4 bit mode of LCD where only 6 pins of P1 would suffice with R/W grounded.So 2 pins of P1 is still free for other jobs.P3 is free. Best Regards A.S.Rudra |