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.

1 lcd 2 seperate pic projects

Status
Not open for further replies.

bbarney

Full Member level 4
Joined
Jan 31, 2004
Messages
208
Helped
19
Reputation
38
Reaction score
5
Trophy points
1,298
Location
canada
Activity points
1,525
i have 2 seperate pic projects i want to connect to one lcd in the same box.is there any way to connect them using some kind of switching
arrangement that is fairly simple or even using a 3rd pic,i have lots of pic's but not to good at writing the code.
any suggestions?
 

I would make a "display module" with one PIC + LCD using serial data inputs.
Then I would add serial data output to the other projects.
In this way you can display info generated in different modules, interfacing
them with 2 wires, DATA and GND.

Best wishes,

humber555



.
 

do u mean to say that u want to run the LCD from 2 different circuits simultaneously?????
 

Like my circuits teacher used to say, there's probably a thousand ways to do this. Just choose one your comfortable with.

Me, I've already built a couple projects where I made use of the I2C bus to communicate between two PICs.

Using a 3rd pic and having the dual bus masters is one option.

Even setting one PIC as the bus master and the other as the unit that controls the lcd is possible as long as you can develop the proper handshaking. This, of course, is very similar to what humber555 is suggesting.


IF your talking about only using one project at a time, look into analog bus switches. That will give you the flexibility to remove the switch with no code change. Digikey sells enough variety that searching through there will lend you an answer.


Cheers,

asd913
 

asd913 said:
I've already built a couple projects where I made use of the I2C bus to communicate between two PICs.

Yeah!
Communication among devices is the key here. You can't drive LCD directly with 2 uC unless there is a communication between them. This will ensure that they will 'cooperate' sending data to LCD.

Else you could not guarantee that the LCD would display information correctly.
 

i was going to just use one project at at time so maybe i'll head to digi-key.
thanks for your input guy's
 

If you don't check the busy flag and use delays instead, you could easily just connect the LCD pins to both PICs. All you need is to have a LCD-Control line shared by both PICs to ensure that both PICs don't access the LCD at the same time, and make sure to set the LCD pins as input pins after each transaction. The LCD-control line would normally be configured as an input pin, and would be asserted by whichever PIC who wants to carry out an LCD transaction. The PIC would check if this line is asserted whenever it wants to carry out an LCD transaction. Of course, there is still a 2 or 3 cycle chance that a clash may occur.
 

to ensure that both PICs don't access the LCD at the same time

But there is no way to guarantee that, even if you're using same clock for both uC.
 

asd913 could you maybe steer me toward some of those analog bus switches.i had a look but don't know what i should really be looking for because i'am a bit of a novice at electronic's
 

I forgot to mention that each of these 74cbt3384's can be used to mux five lines at a time. You need to connect the two outputs buses together.

for instance, 1b1=2b1, 1b2=2b2, etc.


asd913

edit:
on second thought, looking at the pinout, it might be easier connecting opposite sides together.

1b1=2b5, 1b2=2b4,...
 

as requested, here is a schematic.

everyone feel free to correct an issues and mistakes. I'm assuming your using a 4 bit data bus which requires a total of seven lines.


Cheers,

asd913
 

thanks for the schematic.i'am getting lots of little projects that use an lcd and instead of buying 20 lcd's +20 boxes this might be a solution to the problem
 

do you have any preferance for the inverter?
 

bbarney said:
i have 2 seperate pic projects i want to connect to one lcd in the same box.is there any way to connect them using some kind of switching
arrangement that is fairly simple or even using a 3rd pic,i have lots of pic's but not to good at writing the code.
any suggestions?


You can use digital multiplexer such as
74hc175 (quad 2 imput mux) so you can multiplex all
data and control lines from controlers to display
 

nenad_p said:
bbarney said:
i have 2 seperate pic projects i want to connect to one lcd in the same box.is there any way to connect them using some kind of switching
arrangement that is fairly simple or even using a 3rd pic,i have lots of pic's but not to good at writing the code.
any suggestions?


You can use digital multiplexer such as
74hc175 (quad 2 imput mux) so you can multiplex all
data and control lines from controlers to display

sorry I ment 74hc157
 

have you tried to do that with 74hc157 because i've already ordered chips to try out ASD913 idea.
 

if you were a good solderer, you can use a little logic chip like SN74LVC2GU04DCKR... sot23 package... :)
or cd4069, etc...
regards,
 

i'am going to check the datasheets on those and maybe try them all
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top