Olimex Support Forum

Others => UEXT => Topic started by: henk57 on February 23, 2015, 06:47:10 PM

Title: [Solved] MOD-IO2 change Device Address question
Post by: henk57 on February 23, 2015, 06:47:10 PM
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?
Title: Re: MOD-IO2 change Device Address question
Post by: henk57 on February 24, 2015, 11:59:31 AM
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 ~ $

Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: redwane on May 28, 2015, 07:52:40 PM
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
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: henk57 on May 28, 2015, 09:16:53 PM
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
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: redwane on May 29, 2015, 02:32:59 AM
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
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: henk57 on May 29, 2015, 02:44:44 PM
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.
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: redwane on May 29, 2015, 05:25:41 PM
pi is  same as A20, it also contains an SD Card to put the OS image.
ok thank you  very much
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: henk57 on June 04, 2015, 01:43:30 PM
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.
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: redwane on June 04, 2015, 01:57:47 PM
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
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: henk57 on June 04, 2015, 02:11:31 PM
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.
Title: Re: [Solved] MOD-IO2 change Device Address question
Post by: redwane on June 04, 2015, 02:25:41 PM
thank you very much