Electronics > Electronics

Power Conversion Questiions

<< < (4/4)

dunk:
haha. wow. i have a girlfriend who would like nothing more than a house without robots and computers.
she doesn't seem to understand it's just not a room without at least one computer in it....

so i got to thinking, programming a microcontroller to make an i2c I/O controller may be an over complicated way to do things.
so i went searching for ready made i2c I/O controllers.
there are indeed a few on the market.
the problem is most of them you can only assign a limited number of i2c addresses.

philips do a range:
http://www.nxp.com/acrobat/applicationnotes/AN469.pdf

and microchip:
http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=11034&mid=11&lang=en&pageId=79

so most of these have a limit of 8 addresses or less (selected by 3 input pins).
to use these devices on the sort on the sort of scale you are talking about i'm not sure 8 I/O chips would be enough.
the larger ones do 16 I/O ports each.
not really the sort of large sensor network your looking for.

so what options?
there is one i2c I/O device i found that can have up to 64 addresses. its the PCA9501 on the philips datasheet.
the only problem is it's only available in surface mount packages with teeny tiny pins.
not the easyest thing to experiment with.
you would need to either start making your own printed circuit boards or have them made for you. (i have never done either myself so i can't really comment on them.)

the other option is back where i started:
program a microcontroller to do the job.
with a microcontroller you can give it any i2c address you want.
this option also has it's own leaning curve.

there may be a product out there that does everything you need.
ie, lots of available addresses, lots of I/O pins and no complicated programming. all in an easy to use packege.

ok, rant over.

let us know where you end up going with this. you have me interested now.

dunk.

Admin:
Or you could use a shift register IC, where you only need 3 pins to control up to 64. A microcontroller with 9 D/O can control 64 x 3 = lots.

dunk:
yes indeed.
found this application note from Philips last night that describes just that:
http://www.nxp.com/acrobat/applicationnotes/AN036.pdf

for those who can't be bothered reading it, the pdf describes how to take a bus of 64 inputs (switches in their test app) and clock them into one bit pin on a microcontroller and send the output on the I2C bus using shift registers. it describes the same process for outputs too.
although it describes only 64 bit input and output, there is no reason this technique wouldn't work with lot's more I/O pins.

not the simple "one chip per module" solution i was thinking of but definatley a solution that would work.

note that this pdf doesn't make for the easyest reading but once you work out what the 74HC165 and 74HC595 shift register IC do you can skip to the
circuit diagram on the last page.

also note that this pdf describes using philips microcontrollers. i have never heard of these being used by a hobbyest. it would probably be easier to use either Microchip PICs or Atmel AVRs. but then, hey, Bill's never used any microcontroller right? so might as well jump in at the deep end....
(seriously though, if you want to follow the microcontroller route i'd recommend either Microchip PICs or Atmel AVRs. both have their advantages but for the beginner i'd say PICs have the slight edge as they have been around longer so there is far more example code on the internet.)

dunk.

seal killer:
dunk and Admin--

Well, the shift register really seems to be the way to go. So, I bought some training stuff from Parallax (hardware and software) and will mount that learning curve even at my advanced age. The schematics appear fairly simple, even to me.

--Bill

Navigation

[0] Message Index

[*] Previous page

Go to full version