CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Serial I/O chip

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

Serial I/O chip
PostPosted: Tue Mar 29, 2005 11:23 am     Reply with quote

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
PostPosted: Tue Mar 29, 2005 12:45 pm     Reply with quote

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







PostPosted: Wed Mar 30, 2005 1:23 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 30, 2005 3:50 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Wed Mar 30, 2005 7:29 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 30, 2005 8:55 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 30, 2005 3:51 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 30, 2005 5:08 pm     Reply with quote

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.... Cool
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Mar 30, 2005 6:49 pm     Reply with quote

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.... Cool


PIC16F72 is cheaper than a PCF8575. I can buy micros already programmed as well, or just have my ATE do it Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group