sx1505 – 8bit gpio code

18 08 2011

In one of my projects I am using an sx1505 8-bit i/o expander to scan a key matrix.
It has some neat features: two independent i/o voltages, pull-up/down, configurable interrupts, and PLD functions.

Of course after ordering parts I realize there is a better chip with built-in matrix scanning, debounce, and LED PWM… the sx1508:

It’s not completely superior as you lose PLD functionality, and the cost is a few cents more.
I was going to just order it and swap it out, but for some reason they aren’t pin compatible (see SLC pin4 > pin3 below). Should be an easy mod, but still seems like an odd design choice.


Anyway, the main reason for this post was to upload the code I used:
I’ve only tested basic I/O, not interrupt or PLD yet. i2c driver is from atmel AVR1308.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: