Show Posts
Pages: 1 ... 152 153 [154] 155 156 ... 314
2296  Using Arduino / Networking, Protocols, and Devices / Re: I2C I/O Port expander using PCA 9505 on: February 25, 2013, 11:48:14 am
Quote
But I don't find it mentioned anywhere in the datasheet that specifies 0x88 as offset for first port.

Yes, the highest bit is the AI (Auto Increment) bit and, theoretically, can be also set to 0 in this code. But because the auto increment is the default in most devices I set that bit to 1 to have the default behavior.
2297  Using Arduino / Networking, Protocols, and Devices / Re: TCP loop problem on: February 25, 2013, 09:04:09 am
But it's also sent to the 3G shield and the shield may get rather confused by it, don't you think so?
2298  Using Arduino / Networking, Protocols, and Devices / Re: I2C I/O Port expander using PCA 9505 on: February 25, 2013, 09:02:13 am
Quote
I believe "pin" is a number 0 to 7 (or 1 to smiley-cool..? what is the significance of "0x88" and "pin/8"?

The chip you linked to has 40 I/O pins. Why should it only be 0 to 7? In my example it's 0 to 39.
2299  Using Arduino / Networking, Protocols, and Devices / Re: TCP loop problem on: February 25, 2013, 08:57:27 am
Code:
    Serial.println("info sent");

You're sending debugging info to your 3G shield?

Again here it seems:

Code:
Serial.println(".................START..................");
2300  Using Arduino / Programming Questions / Re: can't find a register in class 'SIMPLE_LD_REGS' while reloading 'asm' on: February 25, 2013, 08:53:46 am
Where did you find the fmul instruction? The AVR Assembler User Guide (http://www.atmel.com/Images/doc1022.pdf) does not list it.
2301  International / Deutsch / Re: USBASP Programmer updaten? on: February 25, 2013, 08:44:55 am
Quote
Bin jetzt etwas unsicher weil man ja hier 2 gleiche Teile zusammenschließt wobei andererseits ja eines zum Master wird und das andere zum Slave wird...

Ja, aber der zu programmierende Chip weiss ja, dass er in diesem Fall Slave ist und somit den MOSI auf Eingang zu setzen hat. Eine entsprechende Schaltung findest Du hier: http://arduino.cc/en/Tutorial/ArduinoISP
2302  Using Arduino / Networking, Protocols, and Devices / Re: Arduino microwire 93c66 eeprom on: February 25, 2013, 08:35:00 am
How do you access the unit's EEPROM (bus, soldering out)? You don't provide enough details to help you further. Provide links to all mentioned stuff.
2303  Using Arduino / Networking, Protocols, and Devices / Re: TCP loop problem on: February 25, 2013, 08:30:12 am
Quote
I've made a library out of this:

Then show that library and the code you're doing your tests with. We don't like guessing what you may have done.
2304  Using Arduino / Networking, Protocols, and Devices / Re: I2C I/O Port expander on: February 25, 2013, 08:25:48 am
You also need to wire the address pins, either to Vcc or GND. Based on how you've done that the I2C address of the device changes. Depending on your interrupt needs you also need to connect the INT pin and maybe the OE (Output Enable) pin.

Quote
And mostly I'll have to use the write() function to change the Output pins' state.

If you just want to use them as outputs, your code looks something like this:

Code:
#define I2C_ADDR 0x20
uint8_t digitalWrite(uint8_t pin, uint8_t value) {
  Wire.beginTransmission(I2C_ADDR);
  Wire.write(0x88+pin/8);
  Wire.endTransmission();
  Wire.requestFrom(I2C_ADDR, 1);
  uint8_t old_value = Wire.read();
  bitWrite(old_value, pin % 8, value);
  Wire.beginTransmission(I2C_ADDR);
  Wire.write(0x88+pin/8);
  Wire.write(old_value);
  Wire.endTransmission();
}
2305  Using Arduino / Networking, Protocols, and Devices / Re: HTTP Post with Ethernet Sheild on: February 25, 2013, 06:27:09 am
The Ethernet library knows nothing about HTTP but the HTTP Client Library you linked to does. Within the library folder you find an example folder containing the  PachubePush example. Although there the PUT method is used, the POST method is used almost identically, it just uses postURI instead of putURI.
2306  Using Arduino / Networking, Protocols, and Devices / Re: I2C I/O Port expander on: February 25, 2013, 06:03:01 am
How have you wired the chip to the Arduino? How have you wired the address pins?
2307  Using Arduino / Programming Questions / Re: Arduino Leonardo troubles reading from Serial1 on: February 25, 2013, 06:00:57 am
You may have first to describe how you have wired things up. Without any wiring you cannot read or write anything to/from Serial1 because nothing is connected there. So say us how your hardware looks like (you can make a photograph if that's easier for you).
2308  Using Arduino / Programming Questions / Re: adressing MPR121 sensors through PCF8575 breakoutboard on: February 25, 2013, 05:39:52 am
The MPR121 (http://www.freescale.com/files/sensors/doc/data_sheet/MPR121.pdf) is a I2C capacitive touch sensor chip and the PCF8575 (http://www.ti.com/lit/ds/symlink/pcf8575.pdf) is a I2C to 16 GPIO expander (did you notice the links? Should have been added by you!). Both can be at the I2C at the same time and I don't see why the MPR121 has to be connected over the PCF8575, it won't work the way you're doing it. You can connect 4 MPR121 directly to the I2C by selecting the address with different connections of the ADDR pin.

BTW: you should use external pull-ups for the I2C (4k7).
2309  Using Arduino / Programming Questions / Re: can't find a register in class 'SIMPLE_LD_REGS' while reloading 'asm' on: February 25, 2013, 05:28:31 am
My guess is the compiler uses some upper registers for it's internal usage. In your asm operand you're trying to use all upper registers for your asm command. Have you tried this first with uint16_t variables? For me that compiles, it even compiles with only one of the two variables declared as uint16_t.
2310  Using Arduino / Programming Questions / Re: i2c temperature sensor code problem tc74a0 5.0vat on: February 25, 2013, 05:17:07 am
Quote
thats what I tried but it will not let me copy only highlight

Have you tried the keyboard shortcuts (Ctrl-C/Ctrl-V or on the Mac Cmd-C/Cmd-V)? For me they're working perfectly.

Quote
it only spit out 255 at the varying temps

Then there's something completely wrong as 6 of the 8 bits must be 0 always (by definition as to the datasheet).

Try that new code, I haven't found in the datasheet if the device is able to read more than one register per transfer, so I put it in a separate transfer.

Code:
void loop() {

  Wire.beginTransmission(i2c);

  Wire.write(a);
  Wire.endTransmission();
  Wire.requestFrom(i2c, 1);
  int8_t c = Wire.read();
  Serial.print(c);
  Serial.println("C");
  Wire.beginTransmission(i2c);
  Wire.write(0x01);
  Wire.endTransmission();
  Wire.requestFrom(i2c, 1);
  uint8_t config = Wire.read();
  Serial.print("config: ");
  Serial.println(config);

  delay(500);
}

Quote
with a lighter on the metal tab t0-220

Don't you have a softer method of heating the part? I would try a hair dryer, you won't get to 100°C but over 50°C. A lighter puts temperatures of several hundred degrees to the device which might harm it.
Pages: 1 ... 152 153 [154] 155 156 ... 314