Jump to content

joeyeisinger

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Hmm, I tried that and now the TI examples are working. I don't understand what was wrong before, but oh well. I am still working on my own code for I2c, so I will let you all know how it goes. thanks
  2. ok, thanks for the advice. I thought I would try the TI code examples in the slac080h zip, since they are published by TI, I figured they would work no problem. It doesn't work for me. The lights indicating a nack come on for both master and slave. Has anyone else experienced this? I used the code exactly from the example, except I changed the header file to msp430g2231. I am no longer using external pullup resistors, just internal, my multimeter suggests that they are at the right level, perhaps my problem was hooking up the sda and scl to a microcontroller that was off. Does anyone know if this code is supposed to work, has anyone verified it? I am now working on writing my own i2c from scratch, since i can't get any examples to work. I am sure I will have some questions about it. Thank you for your help.
  3. I am using a version of the TI code, an example that I found in slac080, file msp430x20x3_usi_07.c I have had a lot of trouble with this code, for instance I am using CCS and it doesn't seem to compile the switch block correctly, once the code encounters the first break statement, it exits the block without checking that i2c_state has changed to a new number and that it should now run the next case, so it just exits the ISR. At least that is what I am seeing with the debugger. Anyone else see this? So I stripped the code down quite a bit just to try and get it to send the address and a write bit. I also have an msp430g2231 as the slave receiver, and have not had any luck receiving the address. cde, I haven't tried your code yet, anyone know of some example code that definitely works out of the box on masp430g2231 compiled with CCSv4? I would love to just get one thing to work correctly. I don't have a bus pirate or logic analyzer or scope, so I have been pretty frustrated trying to get this to work, but I will keep plugging away and let you know if I get anywhere. I am not using a twisted pair, are you sure I want to twist the clock and data together? the SCL and SDA wire are about 4" long, not running very near power. what values should i be using for external pullups?
  4. Thanks, I forgot about the jumper pin. An interesting note though: I had internal pull-ups enabled on SDA and SCL, but the code wouldn't run right until I externally pulled up SCL as well. Not sure what that is about.
  5. Hello, I am having some trouble with using my msp430g2231 on a breadboard. I am trying to get some I2C code running, and have found that when the chip is plugged into the launchpad, the code runs as expected. When I plug into a breadboard and hook up Vcc, GND, and RST, the code does not run properly. It seems to get stuck in an ISR. However, if I run a wire from P1.6 (clock signal) on the chip to the corresponding spot on the launchpad, the code runs correctly. Does anyone know what is behind this? Does the emulator on the launchpad do something with the clock signal? Any ideas to get the thing to run correctly without hooking a wire into the launchpad? Thanks, Joey
×
×
  • Create New...