WMP activated with extra I2C-stop-condition

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

WMP activated with extra I2C-stop-condition

Post by quax »

I had problems with this WMP. The activation and usage was not possible. I made some tests with another I2C-test environment and found out, that it can work, but there was something different to the MultiWii sketch.

With this change, I could make the WMP work:

Code: Select all

void i2c_rep_start(uint8_t address) {
  TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); // send STOP condition
  delayMicroseconds(50);        // wait for a reliable stop detection of the WMP
  TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); // send REAPEAT START condition
  waitTransmissionI2C(); // wait until transmission completed
  checkStatusI2C(); // check value of TWI Status Register
  TWDR = address; // send device address
  TWCR = (1<<TWINT) | (1<<TWEN);
  waitTransmissionI2C(); // wail until transmission completed
  checkStatusI2C(); // check value of TWI Status Register
}


It looks as if there is a software I2C solution working.

Additionally, my WMP seemed to be confused by the 400kHz communication with the BMA020. I set all(!) I2C communication to 100kHz and now I can see the signals working in the config tool.

Maybe this may help to activate some other WMP types that refused to cooperate.
Attachments
&quot;stolen&quot; from here:<br />http://static.rcgroups.net/forums/attachments/3/3/8/6/7/5/a3693364-15-IMAG0286.jpg
"stolen" from here:
http://static.rcgroups.net/forums/attachments/3/3/8/6/7/5/a3693364-15-IMAG0286.jpg

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: WMP activated with extra I2C-stop-condition

Post by quax »

Bad news :(

The communication was perfect, but when I gave the motors more than about 50% power, the copter wanted to flip. One motor increased to full power. I changed the assembly of the board, but the result was the same.

Then I exchanged the WMP with a ITG3205 and now the copter works fine, no problem at any power stage.

I don't try this board again :!:

didlawowo
Posts: 8
Joined: Tue Apr 05, 2011 12:42 pm

Re: WMP activated with extra I2C-stop-condition

Post by didlawowo »

HI,
did u use the wmp itg3205 in native mode or in wmp mode ? did u have a picture of the connexion ?

thx in adv.

User avatar
quax
Posts: 47
Joined: Mon Mar 14, 2011 12:28 pm
Contact:

Re: WMP activated with extra I2C-stop-condition

Post by quax »

didlawowo wrote:HI,
did u use the wmp itg3205 in native mode or in wmp mode ? did u have a picture of the connexion ?

thx in adv.

I use it in native mode. Here is the picture.
Attachments
BMA020&ITG3205.jpg

Post Reply