View previous topic :: View next topic |
Author |
Message |
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
Serial I/O chip |
Posted: Tue Mar 29, 2005 11:23 am |
|
|
I have a 40 pin PIC with almost all I/O used up and we have a new spec to add 8 inputs/8 outputs so I was looking for a serial shift register that would gain me some IO using SPI or IIC. I saw a chip on Maxim website (MAX4820) and requested samples. It gets me 8 relay driver outputs. I would also need 8 dc (+12V) inputs..... Thanks. |
|
|
Guest
|
Re: Serial I/O chip |
Posted: Tue Mar 29, 2005 12:45 pm |
|
|
ljbeng wrote: | I have a 40 pin PIC with almost all I/O used up and we have a new spec to add 8 inputs/8 outputs so I was looking for a serial shift register that would gain me some IO using SPI or IIC. I saw a chip on Maxim website (MAX4820) and requested samples. It gets me 8 relay driver outputs. I would also need 8 dc (+12V) inputs..... Thanks. |
you don't need a serial shift register. You need an I/O port expander...
Philips PCA9535 or MAX7313. That's just for general I/O, not sure about driving relays though. |
|
|
della Guest
|
|
Posted: Wed Mar 30, 2005 1:23 am |
|
|
I think you can better use the standard chips 74595 (for 8 outputs) and 74165 (for 8 inputs). There are also drivers in the CCS example directory. These chips run with SPI. And for the relay control add extra transistors or other cheap drivers (maybe also from the standard TTL series).
The special chips from MAXIM are really nice but I think they are more expensive an not easy to get from a distributor. Such special chips are always out of stock... |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Mar 30, 2005 3:50 am |
|
|
The standard 74xxx chips are cheap and good available but have one major drawback, there is no way you can check the input and/or output is correct. Just imagine there is some noise on the clock line, then the shift registers might get a 1-bit offset. Depending on your application you will have to decide whether or not to take this risk. The dedicated I/O-expander chips have more advanced features, for example allowing you to read back the settings.
Maxim hace some nice chips, but long lead times. A single sample is often quick available, but ordering 100 pieces might take 10 weeks.
Philips has several I2C expander chips like the PCF8574 (8 bit) and PCF8575 (16 bit). The PCF8574 is in stock with Farnell.com, PCF8575 seems more difficult to get. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Mar 30, 2005 7:29 am |
|
|
Don't like any of those suggestions, you can always make your own I2C device out of a really cheap micro. |
|
|
jds-pic
Joined: 17 Sep 2003 Posts: 205
|
|
Posted: Wed Mar 30, 2005 8:55 am |
|
|
ckielstra wrote: | Philips has several I2C expander chips like the PCF8574 (8 bit) and PCF8575 (16 bit). [...] PCF8575 seems more difficult to get. |
i've used both, and recommend both.
my driver for the PCF8574 is in the code library forum:
http://www.ccsinfo.com/forum/viewtopic.php?t=19526
jds-pic |
|
|
fuzzy
Joined: 26 Feb 2005 Posts: 64
|
|
Posted: Wed Mar 30, 2005 3:51 pm |
|
|
I tryed to use PCF8575 to drive some relays by using uln2003. but i had a ot of difficulties.they seems not driving much current to activete uln2003 inputs. i needed 18 external I/O and I had to use 2 PCF.So I decided to use a PIC 16F876 as external I/O expander thata has 20 I/O and 2 pins for I2C or RS232.
It will cost as 2 PCF8575 and it is more versatile and strong.
I only have Problem connecting this PIC as slave on i2c.
in rs232 communication is perfect. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Mar 30, 2005 5:08 pm |
|
|
Mark wrote: | Don't like any of those suggestions, you can always make your own I2C device out of a really cheap micro. | Designing your own I/O expander is flexible and ofcourse a 'sexy' thing to do, but economically it's more expensive (higher bill of materials, longer design time, higher bug risk, higher production costs because of programming a 2nd microcontroller).
But, yes, if you have some spare time and are manufacturing a small series, then creating your own I2C device is a lot of fun. Screw the shareholders.... |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Mar 30, 2005 6:49 pm |
|
|
ckielstra wrote: | Mark wrote: | Don't like any of those suggestions, you can always make your own I2C device out of a really cheap micro. | Designing your own I/O expander is flexible and ofcourse a 'sexy' thing to do, but economically it's more expensive (higher bill of materials, longer design time, higher bug risk, higher production costs because of programming a 2nd microcontroller).
But, yes, if you have some spare time and are manufacturing a small series, then creating your own I2C device is a lot of fun. Screw the shareholders.... |
PIC16F72 is cheaper than a PCF8575. I can buy micros already programmed as well, or just have my ATE do it |
|
|
|