Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

can I use P0 as a port, data and address at once ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Hello guys,
At 89S52 chip
can I use P0 as a port, data and address at once ?
I need P0 for addressing, receive data from Flash and use it as data port to TFT LCD,

Is it possible ?

Thanks
 

Basically, Po can be used in a triple function:
- bus data (accessed during MOVX instructions)
- multiplexed bus address 0 to 7 (latched by ALE)
- as open drain port pins.

Your application needs to consider the fact, that the P0 output state is temporarily changed during bus accesses. Also the peripherals connected to the port must not short the bus.
 

Basically, Po can be used in a triple function:
- bus data (accessed during MOVX instructions)
- multiplexed bus address 0 to 7 (latched by ALE)
- as open drain port pins.

Your application needs to consider the fact, that the P0 output state is temporarily changed during bus accesses. Also the peripherals connected to the port must not short the bus.

How can I share it in code ?
89S52 will take my code from 29C512 but I want to use the AD0-AD7 as a P0-P7 as well as a controller for TFT...
I have tested that that 89S52 has be able to read my code in 29C512....
How can I use AD0-AD7 as P0.0 to P0.7 for my TFT ?

Any info will be appreciated..
Thanks
 

Depends on how the P0 TFT interface is used in your code.
 

Depends on how the P0 TFT interface is used in your code.

Is it possible if I put like this :
tft MCS51 port
d0-----------P0.0
d1-----------P0.1
d2-----------P0.2
d3-----------P0.3
d4-----------P0.4
d5-----------P0.5
d6-----------P0.6
d7-----------p0.7
 

The question isn't about the pin assignment rather than about the interface functionality and timing. Does it tolerate the temporary level transitions during flash read? Can it possibly be operated as a data bus interface controlled by WR?
 

The question isn't about the pin assignment rather than about the interface functionality and timing. Does it tolerate the temporary level transitions during flash read? Can it possibly be operated as a data bus interface controlled by WR?

There may be a conflict during flash read, that's what I'm thinking, but I need more memory next time.
I have two options in my mind, modify the circuit or the code...
Do you have any suggestions ?
Do you want to see the circuit diagram ? I'll send you via email...
If you don't mind, you can tell me your email address at private message,
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top