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.

[51] Please help! Try to get 2 89c51 comunicate through parallel port

Status
Not open for further replies.

bibiboo

Newbie level 4
Joined
Sep 1, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
I am trying to transfer 1 byte between 2 89c51 through parallel port. However, i don't know how to get the right value in port 2. I used MOVX command but i don't know the exactly time i need to get the right data. Is this when WR signal go low or ALE go low? Please help me. I have attached the keilc code ( asm) and proteus file. Please help me check it or give me any suggestion. Thank you first.

There are 2 folder in my zip file. Master folder contains code for master. Slave folder contain code for slave and proteus file.

parallel.pngView attachment parallel com.zip
 

You'll find a clear timing digram of "External Data Memory Write Cycle" in 89C51 hardware description. Data is put on P0 during nWR low, for about 6 clock cycles.

But how do yout want to latch the data in the second 8051? It has no bus device interface or input capture feature. The idea simply doesn't work.

You can of course set the data statically at P0, inform the other processor by an additional port signal about pending data, read it some time later, possibly set an acknowledge signal by the other processor, etc.
 
Thanks for your kindness. I build this circuit in order to illustrate handshaking for parallel communication but i not sure when i read the port p2 to get the right data the first 89c51 transfers. Base on your reply if i connect the wr signal of first microcontroller to int0 of second microcontroller and using interupt ( edge triger mode) can i get the right value ? ( i just want to read the data first and after that i will add the handshaking signal OBF and ACK) can u help me ?
 

It hardly can work with MOVX. When the interrupt service routine finally reads the data, the write cycle is long gone.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top