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.

itead openPCBs

28 07 2011

I received my itead PCB order today (sent jul 12, shipped jul 17). Since I decided to share all three designs (open PCB), I received some interesting boards in return.


AVR based game console.

Op-amp testing board (

Schematic, board, and parts info can be found on his page.

Bluetooth/SD breakout board (no link):

– HC-05/06 bluetooth module
– RFM22B transceiver
– MicroSD card socket

Liquidcrystal LCD bluetooth module (no link):

Keyswitch board (no link):

It looks like multiple boards can be joined together to form a larger key area. Would be cool to see what this was used for (midi?).
Uses cherry MX style switch footprints, I had some spares as you can see (MX1A-11NN).

Mini interconnect boards (