Go Down

Topic: How to expansion I/O? what's a good and cheaply way using AT89S52? (Read 414 times) previous topic - next topic

yongjie

Hi specialists,

I am a newcomer and using AT89S52 now. here have anybody who know How to expansion I/O? what's a good and cheaply way?  :D

Cheers,
Yong Jie

majenko

An IO expander.  One I use lots of is the MCP23017 which uses I2C to provide 16 IO ports.  Up to 8 of them can be hooked up to the same I2C bus giving up to 128 extra IO ports.

It's also available as the MCP23S17 which uses SPI instead of I2C if you need a higher speed.

If you want ultra cheap and only want one direction of data (say 8 output ports), you can use a simple shift register.  The most common is probably the 74HC595.  You can cascade as many of these together as you like to give you lots and lots of IO ports.  They are often used to drive LED displays, and can be controlled using the shiftOut() command in the Arduino.

BulletMagnet83

Couldn't you also map some 82C55's into the external bus? If you wanted to keep any serial interfaces free for other purposes, you could use as many of those as you have free address space and end up with more I/O than anyone could ever want :)

ryan27968

probably the easiest and cheapest way us just with a simple 8 bit shift register. they are very cheap and easy.

Go Up