Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Psii

  1. Yeah that seems like the cause. 220nF didn't work either. Used 2x100nF labeled caps with high tolerance in parallel. Measured their total capacitance to 178nF
  2. I am sorry for being such a pain. I did try a 2.2nF numerous of times without success. Your last post made me realize the purpose of the capacitor. Since my pullup resistor deviates from the recommended value, I figured I had to use another capacitor to get the appropriate charge time. I tried lots of different values. What finally made it work was 178 nF, holding the device in a reset state for just the right amount of time. The device now operates as intended. Thanks for all your help
  3. Scratch that, I am at a loss here. The above configuration worked yesterday. I think the device is set up to be able to run in standalone. I can get it work doing the following: Power the device. Then short RST to ground for a split second, reseting the device. Works everytime. Any suggestion? Is there a register I can set in order to generate the same condition as when grounding and then releasing the RST line?
  4. Got it working by adding a voltage regulator as a power supply, 100R pullup and 2n2F pulldown on RST, 100R pulldown on TEST.
  5. Oh, the configuration on the TEST line also seems to matter. If it is not connected during a power cycle, the ADC gives the wrong value.
  6. Leaving TEST open or connecting it to ground did not change anything. The system still works while RST is connected to the ez430. I then tried to connect a 47k between RST and Vcc, and it stopped working. 2n2 F to ground did no good either. Tried lower resistors without luck. When connecting RST directly to Vcc, the circuit operates but gives the wrong ADC value. There is a 4.7k pullup to Vcc on the PCB, god knows why. I just know I cannot do anything about that, and it is not sufficient for standalone operation. So I guess I have to emulate the exact component configuration on the RST lin
  7. Hmmm, as far as I can see, there is a 4,7k ohm resistor between RST (4701 SMD) on the PCB. And TEST is not connected to anything. I disconnected TEST and connected it to VCC, still worked. But when I tried to connect REST to 47k, it stopped working
  8. OK, so I have encountered a problem. The circuit programs just fine and works... as long as the programming wires (two wires) are connected too the device. Once I remove them, the interrupt routine for SPI will not trigger. When I attatch them, it works again. I also noticed that if I turn the LED on, then unplug the SBW cables, the LED light will become weaker. Does this mean the MSP430 does not get enough current?
  9. I guess it could be, because the data seems very unpredictable. On the other hand, the SPI clock is set to 16 MHz/128 = 125 kHz, so I don't think that could be the case. (2 hours later) I got it to work. The thing is that I am switching between using I2C and SPI on the same lines. The iniatilization of these interconnection standards were wrong. I went with using hexadecimal values instead of the library names when setting the USI registers, and it worked: void SPI_slaveInit(void) { // SPI USICTL0 = 0xE3; USICTL1 = 0x11; USICKCTL = 0x00; } void i2c_masterInit() { // I2C
  10. I am using my MSP430F2012 as a slave to an Arduino. The arduino sends out the value 0x01 whenever I press "1" on the keyboard. So basically, what I want to do is have the MSP430 execute different operations depending on which value it receives from the master. In debug, mode I put a breakpoint in the cases where the value I read from USISRL is 0x01 and 0x02. The variable RxData (unsigned char) stores this value. The switch statement tests this variable and executes the appropriate operation. The problem is: Every second time I (odd numbers it seems) I press "1", RxData reads "2", although
  11. By this you mean that the chip select is controlled by the slave?
  12. Fixed it using some transistors to make the voltage converters.
  13. I think I have found the cause. It was not the Arduino but the voltage dividers I had used to drive the logic level from the Arduino from 5 V to 3 V. I changed the SDA line voltage divider with a 3.3 Zener diode to ground, and now I get the correct pulses, but about half the amplitude that should be expected. Here is a capture:
  14. This is when disconnected from the Arduino: This is when I connect SDA to the Arduino:
  15. Very informative, CDE. Thank you! After trying to initiate the above, I found that my I2C routine was not working together with my SPI program. They both work separately. So I tried running I2C without implementing SPI, but still hooked up to the Arduino. Then, the I2C-routine wold not work either. So I hooked up an oscilloscope to the MISO/SCL and MOSI/SDA lines. The clock signal worked just fine, clocking 8 cycles + acknowledge cycle. The SDA line however was looking a little strange. Where the SDA should read 10010010 there was a long pulse at about 1/3 of the expected amplitude, lastin
  16. Thank you for showing me this. I actually worked out a bit-baning I2C using this guide. I am trying to control the MSP430 using an SPI interface. So basically what I thought of doing was to have my SPI master (an Arduino) send commands telling the MSP430 what to do. In the USI interrupt vector I think I will have a case-statement responding to different 8-bit values received from the arduino. If 0x01 is sent from the Arduino, the MSP430 will perform an ADC read through I2C bit banging. That's the idea anyway. So what I need to figure out now is what to enable and what to disable when
  17. Or is it possible to use another interrupt vector than USI_VECTOR for SPI? For example the SS and SCLK lines connected on P1.2 and P1.7, respectively.
  18. I need to perform I2C communication (with the msp430 as the master) without using interrupts. I have scanned the internet, but could not find any example on how to do it. The main challenge for me is to determine the (N)Acks. How can I see if an acknowledgement is received without using interrupts? Polling? Could anyone point me in the right direction on this?
  19. Fixed this giving the new value as the first operation in the USI interrupt routine.
  20. To minimize the design, I guess.
  21. I am running SCLK at 125 kHz, so I don't think parasitic capacitance will be a big problem. I probed the MOSI and SCLK lines with an oscilliscope. The clock looked fine (when neglecting the shape of the pulses) and levels ranging from 0 to 3.2 V. MOSI however, had a Vmin of 1.5 V and Vmax equal to 3.1 V. I figured it had something to do with the voltage being divided by some other resistances on the PCB (though there shouldn't be). So I roughly calculated a new external voltage divider, and the levels looked much better. While looking at the scope, I saw that the value of the MOSI signal
  22. And, does that fact that MOSI and MISO line being pulled high (due to them also being used for I2C) suggest that I have to change the clock polarity?
  23. Another thing I could mention is that I measured the logic level of the SPI output pins of the Arduino to be 5 volts, I used 4 voltage dividers (20 kohms and 30kohms) to drive the for lines down to about 3 V.
  24. Thank you. I might look into an FTDI IC at a later stage. For now, I've decided to use an Arduino to act as the SPI master. There is only one slave, which will be the MSP430. I have configured the USI for SPI operation in slave mode as follows: // Slave by default USICTL0 |= USIPE7 // Enable SPI input mode on P1.7 + USIPE6 // Enable SPI output mode on P1.6 + USIPE5 // MUX P1.5 to SCLK + USIOE; // Enable output The slave select line is wired to P1.2 of the MSP430F2012. Do I need to configure this pin aswell (make it inactive or whatnot)?
  • Create New...