[Solved] MOD-IO2 change Device Address question

Started by henk57, February 23, 2015, 06:47:10 PM

Previous topic - Next topic

henk57

I would like to change the Device Address because it is in the same base address as the MCP23017 (I have more than one board in the circuit).

I believe it could changed in the older Firmware, but in README.TXT of Firmware rev.3 it is not mentioned, so how to do that?
Must I reflash the chip to change it to ie. 0x31 and edit in the source files?

henk57

I found it.
It's indeed undocumented and complety different in te version before this one.

FIY;

pi@raspberrypi ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         

## Change Address lets say 31 as example ##
## 21 Include R/W Bit == 42 ##

pi@raspberrypi ~ $ bw_tool  -I -D /dev/i2c-1 -a 42 -w f0:31 

pi@raspberrypi ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

## RESTART MOD-IO2 FW Rev.3 ##
                       
pi@raspberrypi ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- 31 -- -- -- -- -- -- -- -- -- -- -- -- -- --   
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
pi@raspberrypi ~ $


redwane

hello,
I follow the steps for change the address of my device MOD-IO, but I displays the following error:
-bash: bw_tool: command not found
can you help me
thank you

henk57

It is allready some months ago, I went to this site and follow the instructions and install the tools on Wheezy (but it depends on the Wheezy version as mentioned in the article).

https://www.abelectronics.co.uk/i2c-raspbian-wheezy/info.aspx

After this (and it takes time.., so prepair 2 cups of caffee) you should run the I2C commands.

So the best way to do, is the use of a blank SD-card and copy a Wheezy image on it.

Good luck

redwane

thank you for the answer, I want to change the MOD-IO address with olinuxino A20.  MOD-IO does not an SD card !?
sorry for the language

henk57

Oeps, you don't have a Pi.

I don't know the workarround for the A20, because I have the Pi.
For the Pi you'll need a SD-card to put the software-image.

For the A20 I don't know.

redwane

pi is  same as A20, it also contains an SD Card to put the OS image.
ok thank you  very much

henk57

Firmware 3.02 is released.

In the README.txt is explained now, how to change the base-adress
I didn't try this FW, yet.

Olimex have improved the FW & source, thank you.

redwane

sorry i'm newbie in embedded system,need I a programmer to change the firmwire?
how I can change the firmware of the board ?
thank you

henk57

You need ie. PicKit 2 or PicKit 3 programmer and make connection (ICSP) programmer to the MOD-IO2.
Read the manuals PicKit and MOD-IO2, which I did also.