![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
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.. |
|
|
|
|
|
|
(permalink) |
|
You don't. One PIC runs the LCD and the other 3 tell it what they want it to display.
|
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) | |
|
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:
|
||
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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? |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) | |
|
Quote:
for 16F877, i just know it hv RA0-RA3,RA5,RE0-RE2 eight analog input.. what u mean by switch to pin compatible? thanks.. |
||
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
I'd use a couple of CD4051s and a single PIC.
|
|
|
|
|
|
|
(permalink) |
|
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.. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| 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 |