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.

Four PIC with One LCD..

Status
Not open for further replies.

meera83

New Member
i m using PIC16F877..
i would like to use 25 analog device as input signal, so i choose to use four PIC to control it(one PIC can control 8 analog input)..

the four PIC will send a command to LCD when either one of the analog device give input value..

the problem is how should i do in order to let four PIC share using one LCD?

if i use PORT C as LCD pin, then how the hardware circuit should i built to let four PIC send signal to PORTC?

thanks..
 
Well that's a brain dead solution to the problem. Why not use a multplexer on the analog inputs? Most I/O devices like LCD displays react badly when controlled by more than one source. Would you ever consider connecting two outputs together? It only works if the outputs are open-drain or open collector. Not common, but not exctinct either.

If you're really enamoured with processor proliferation then use five. One to control the LCD and four to control the analog inputs. Make the display processor fetch the analog data over an SPI port.
 
Sounds like you have a big project on your hands. Hope I helped, but others have more experience than me.

I have never tried this myself, but the usual procedure is to use one of the pics as the master, like Papa said, and that pic can accept inputs from the other 4.
This is what I would try (may not work).

4 16f877's, each a slave
1 Master PIC (another 877 may be easiest)
each slave PIC PortC wired together in one bus.
Master would have interrupt request inputs from each 877.
Master tells which pic can send data (PortC becomes output), otherwise all 4 877 PortC's are tri-stated or inputs.

While very overkill, I would use 5 pics just for the experience it would give me. It would be a rewarding project when finished. But an analog multiplexer, as Papa mentioned, would be the easiest. You would also have fewer forehead marks in your walls, too.
 
Last edited:
If you switch to the pin compatible 16F887 then you will have 14 analogue inputs per chip. You will also have an internal oscillator which will simplify the circuit. You could use a 16F883 for the second chip.

Mike.
 
yap, initially i plan to use 4 PIC for analog input, and another one PIC use to display LCD..

for PIC that receive analog input, i send the command that want to display on LCD to PORTC, then the PORT C pin will connect to LCD PIC pin as input..

since i use four PIC for analog input, mean that i hv four PORTC that need to connect to one PORT on LCD PIC..
it's wrong if i connect four pin RC0(analog LCD) to one pin RC0(LCD PIC)..

if i choose to use multiplexer among four PIC and one LCD PIC, port C got 8bit(RC0-RC7), is it mean that i need to use 8 multiplexer?
one multiplex use to collect four pin RC0 for four PIC..
one multiplex use to collect four pin RC1 for four PIC..
....
....
one multiplex use to collect four pin RC7 for four PIC..

then the circuit will become quite big..

got any other method to let the communication among four PIC and one LCD PIC?
 
Papabravo said:
Well that's a brain dead solution to the problem. Why not use a multplexer on the analog inputs? Most I/O devices like LCD displays react badly when controlled by more than one source. Would you ever consider connecting two outputs together? It only works if the outputs are open-drain or open collector. Not common, but not exctinct either.

If you're really enamoured with processor proliferation then use five. One to control the LCD and four to control the analog inputs. Make the display processor fetch the analog data over an SPI port.

i can't choose to use multiplex on analog input,cos all the analog signal are real time, no such button that i can use multiplex to enable the device..
 
Pommie said:
If you switch to the pin compatible 16F887 then you will have 14 analogue inputs per chip. You will also have an internal oscillator which will simplify the circuit. You could use a 16F883 for the second chip.

Mike.

can u explain more? i didn't get what u mean by?
for 16F877, i just know it hv RA0-RA3,RA5,RE0-RE2 eight analog input..
what u mean by switch to pin compatible?

thanks..
 
The 16F887 is a modern version of the 16F877. The main advantage of the 887 is it has 14 ADC input pins and an internal oscillator. The 16F883 is the 28pin version and has 11 ADC inputs, between the two chips you would have 25 inputs!! Download the data sheet from Microchip and have a look.

Mike.
 
this is my 1st time heard about analog multiplexer, before i just use for digital one..

thanks to all of u..

i will try with all of your suggestion..

thanks..
 
meera83 said:
this is my 1st time heard about analog multiplexer, before i just use for digital one..

PIC's only have ONE analogue to digital converter, the multiple inputs are provided by an internal analogue multiplexer - it's a complicated name for an electronic switch.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top