To interface an LCD and a 4x3 keypad to a pic requires a minimum of 9 I/O pins without any additional glue logic. Surely, the 24 I/O pins left are enough for your needs.
Mike.
To interface an LCD and a 4x3 keypad to a pic requires a minimum of 9 I/O pins without any additional glue logic. Surely, the 24 I/O pins left are enough for your needs.
Mike.
The 4x4 keypad (8pins) and LCD (7pins) takes up 15 in total, which leaves 16 I/O pins. At the moment, this is just enough to interface my other components (ds1307 etc..), but it doesn't leave much room for expansion. So, I'm just looking for a general description of interfacing 2 micros just in case i need it in the future.
thanks
Back in the days when it took a handful of chips to support the processor buying a development board saved a lot of time. Not so much anymore.
For a person just starting a complex development board will often be both overkill and confusing.
People who know what they are doing will often find development boards limiting.
I have no idea what your ability is.
Please post questions to the forums. PM's are for personal communication.
BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
Well... Lcd requires 6 pins, there is no need to read from the LCD so you can tie the r/w pin and save a PIC pin. Also you can use the same 4 PIC pins for the LCD data drivers and the keypad column drivers. So you only need 10 pins total. I believe that's what Pommie was saying.
Interfacing a second micro is almost always the worst way to do it. You can add a very cheap serial->parallel latch chip for a few cents, and these can be chained to give unlimited amount of output pins from just 2 PIC output pins. Likewise some of these latch chips can be used parallel->serial to give 8 more input pins for the cost of 2 PIC pins.
Thanks Mr RB!!
This will make my project much easier!!
While all he needs is extra I/O in this case there's nothing bad about using two micro's. SPI isn't that difficult.
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
I have tried to be delicate but have gotten no reply.
My take is that we have a user who has yet to blink a led talking about multi-uC's. My feeling is that until you have done some of the simple things you should not be looking this far down the road.
Please post questions to the forums. PM's are for personal communication.
BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
I love those 74HC595 chips. I bought a few sticks of them surplus for about 5c/chip, the only down side is that are SO16 package but still easy enough to solder. I've got some little SO16-DIP16 headers too for through hole use but usually just use the SO16 and solder to the PCB.
They only need 2 pins; clk and data to drive 8 output pins and no timing issues. And you can chain them as I said above. I really can't see why you'd mess with two PICs with 2 lots of software, 2 times you have to program them, 2 xtals, possible slow asynch serial clock rates etc etc??
Nigel, SPI is much faster than serial, there's no possibility of baud rate missmatches and it's bidrectional as well.
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
What do you want massive speed for?, feeding an LCD and reading a keypad are incredibly slow processes - there's no problem with baud rate mismatches (unless you deliberately write them, and why would you?). It's also easy to do bi-directional via serial using just a single pin, saving even more valuble I/O.
People seem to jump on I2C, SPI, and even the parallel port in one case as ways to transfer data between two PIC's, serial is much simpler than all of them, and for most cases exceeds any requirements for the data transfer.
All communication methods have their uses, but what's 'best' for a particular application isn't always obvious.
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Your right 3v0, but I still need to plan my project before diving into the implementation.I have tried to be delicate but have gotten no reply.
My take is that we have a user who has yet to blink a led talking about multi-uC's. My feeling is that until you have done some of the simple things you should not be looking this far down the road.
I've also hit another problem...Is it possible to operate a SPI IC and 12C IC simultaneously using 1 micro?? I'm a bit confused by the micro (16f887) data sheet...