Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

can i use a single port with 3 latches for diff purpose

Status
Not open for further replies.

esconele

New Member
i'm using at89c52 port1 for lcd display ,8 switches and another 8 switches with a seprate latch for eatch can it be possible that i'll get the correct result or it will form a mesh as lcd display needs the port as output and other switches need same port as input.pls suggest me
thank you
 
You can make your ports do anything you want. The secret is to manage who is allowed to talk(output). Any number of devices with tri-state outputs can be placed in a high-impeadance state, including the processor, and connected together. This is normally accomplished with sginals labeled CS(Chip Select) or OE(Output Enable). The rule is that no two devices can be talking(driving their outputs) at the same time.
 
Hi
You can use 3bits from port2 of the 89C52 as chip select for the LCD and the switchs by this way you will be able to control each device by setting it chip select to logic 0 .
 
a single port for 3 diff purpose

sir,
i'm using 74ls373 latches seperate for each i.e for lcd ,for 8 switches and for another 8 swithes i've connected chip select pins of each latch to port0.5,0.6,0.7 and when i'm using lcd i kept other 2 latch disable by giving low on chip enable pins and for other two also i'm doing same but problem is that when i connect all 3 latches it doesnts give the results in datasheet of 74ls373 it is given that to disable perticulr latch we have to keep
OE pin low but i dont have any port pin to connect these OE pins all port pins are already used what should i do
thank you
 
Without seeing a schematic I can't be absolutly sure but it sounds like you should have the latch enable pin G held high for the switches. This makes the latch transparent. This means that the output follows the input. The processor should contol the OE pin by taking it low when it wants to read the switches.

I'm not sure which way the latch to the LCD goes. I hope that you only want to write to the LCD in which case you should have OE grounded on this latch and take G high when you want to change the value in the latch. Come to think of it why do you even nedd a latch on the LCD?
 
latch

lcd and swtches are connected to same port and i want to display status of switces pressed on lcd for that oirt pins should be first taken as input and to display port pins should be defined as output pins and to latch data for lcd i used latch for lcd.but its not working.
thank you
 
Hi
I prefer to use 74LS244 instead of 74LS373 to interface the switches to the 89c52 i think you did not need the latches to interface the switches
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top