Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 20th September 2007, 12:38 AM   (permalink)
Default Four PIC with One LCD..

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..
meera83 is offline  
Reply With Quote
Old 20th September 2007, 01:01 AM   (permalink)
Default

You don't. One PIC runs the LCD and the other 3 tell it what they want it to display.
3v0 is online now  
Reply With Quote
Old 20th September 2007, 01:02 AM   (permalink)
Default

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.
Papabravo is online now  
Reply With Quote
Old 20th September 2007, 01:08 AM   (permalink)
Default

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 by Ambient; 20th September 2007 at 01:21 AM.
Ambient is offline  
Reply With Quote
Old 20th September 2007, 01:38 AM   (permalink)
Default

The master PIC should be able to run the LCD and 8 analog inputs. It has more then enough pins and cycles.

But PapaBravo had the best suggestion

Quote:
Why not use a multplexer on the analog inputs?
3v0 is online now  
Reply With Quote
Old 20th September 2007, 02:13 AM   (permalink)
Default

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.
Pommie is online now  
Reply With Quote
Old 20th September 2007, 02:14 AM   (permalink)
Default

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?
meera83 is offline  
Reply With Quote
Old 20th September 2007, 02:16 AM   (permalink)
Default

Quote:
Originally Posted by Papabravo
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..
meera83 is offline  
Reply With Quote
Old 20th September 2007, 02:19 AM   (permalink)
Default

Quote:
Originally Posted by Pommie
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..
meera83 is offline  
Reply With Quote
Old 20th September 2007, 02:31 AM   (permalink)
Default

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.
Pommie is online now  
Reply With Quote
Old 20th September 2007, 03:06 AM   (permalink)
Default

Quote:
Originally Posted by meera83
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..
The analog multiplexer is not a button run by a person. It is controlled by the processor.
3v0 is online now  
Reply With Quote
Old 20th September 2007, 04:13 AM   (permalink)
Default

I'd use a couple of CD4051s and a single PIC.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply With Quote
Old 20th September 2007, 06:23 AM   (permalink)
Default

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 is offline  
Reply With Quote
Old 20th September 2007, 06:40 AM   (permalink)
Default

Quote:
Originally Posted by meera83
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Nokia 7110 LCD + questions regarding code and behaviour of LCD. MrNobody Micro Controllers 2 19th September 2007 07:50 AM
Writing 2 Graphics Lcd Using Pic cyprio7 General Electronics Chat 8 18th September 2007 02:07 AM
color TFT LCD module/controller flemmard Datasheet/Parts Requests 1 16th September 2007 03:47 AM
Graphic LCD flemmard Micro Controllers 1 13th September 2007 02:32 AM
LCD Troubles Kyle-s4h Micro Controllers 13 11th September 2007 12:30 PM



All times are GMT. The time now is 12:02 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.