Jump to content


  • Content Count

  • Joined

  • Last visited

About ElectricCowboy

  • Rank
    Noob Class

Profile Information

  • Gender
  • Location
    Texas, USA
  • Interests
    Designing and creating prototypes on the TI MSP430.

Recent Profile Visitors

334 profile views
  1. Hello, I am trying to determine the frequency of the TIMER_A with a given Capture/Control Register 0 (CCR0) value 0. My understanding is that the frequency is (SMCLK)* (1/CLOCKSOURCE_DIVIDER)*(1/Number of Cycles) My configuration: Clock source is SMCLK. SMCLK frequency is 8MHz (1), CCR0 value is 50000 decimal (0xC350). TIMER_A is set in continuous mode (TIMER_A_CONTINUOUS_MODE) "timer_a_ex2_continous ModeOperationWithCCR-Interrupt"Src: MSP430ware/Libraries/Driver Library/MSP430F5xx_6xx/Example Projects/TIMER_A The only change I made is this: replaced TIMER_A_CLOCKSOURCE_DIVIDER_1 with TIMER_A_CLOCKSOURCE_DIVIDER_16. f = (8 MHz)*(1/TIMER_A_CLOCKSOURCE_DIVIDER_16)*(1/50000) = 10Hz When I execute the code I see the LED blink on and off with an estimated frequency of 0.80s. I am using a simple timer on my phone to estimate the frequency. Looks like I am off by one order of magnitude... What am I missing? I appreciate any help from the community? With kind regards, Electric Cowboy References: (1) - "slau533b - MSP-EXP430F5529LP User's Guide.pdf" - page 45/61 (2) - "slau390c - Unified Clock System.pdf", Figure 1-1 UCS Block Diagram - page 3/29. Code excerpt: #define COMPARE_VALUE 50000 // Valid range is 16-bits 0x0000 (0d) to 0xFFFF (65535d) //Start timer in continuous mode sourced by SMCLK TIMER_A_configureContinuousMode( TIMER_A1_BASE, TIMER_A_CLOCKSOURCE_SMCLK, TIMER_A_CLOCKSOURCE_DIVIDER_16, // Here I changed from "..._1" to "..._16" TIMER_A_TAIE_INTERRUPT_DISABLE, TIMER_A_DO_CLEAR ); //Initiaze compare mode TIMER_A_clearCaptureCompareInterruptFlag(TIMER_A1_BASE, TIMER_A_CAPTURECOMPARE_REGISTER_0 ); TIMER_A_initCompare(TIMER_A1_BASE, TIMER_A_CAPTURECOMPARE_REGISTER_0, TIMER_A_CAPTURECOMPARE_INTERRUPT_ENABLE, TIMER_A_OUTPUTMODE_OUTBITVALUE, COMPARE_VALUE ); TIMER_A_startCounter( TIMER_A1_BASE, TIMER_A_CONTINUOUS_MODE );
  2. SUCCESS! I added 10k-ohm pull-up resistors to the SCL and SDA lines on both sides of the level shifter. I updated this thread with code, an updated schematic and a snapshot of my dev board including one test pattern showing Green, Red and Yellow pixels. Many thanks to zeke and SvdSinner for their help and replies to this thread. For me, this is a nice little accomplishment for a variety of reasons: TI Code Composer Studio, TI MSP430 LaunchPad, reuse of an 8x8 Bi-Color Matrix device, and using I2C (albeit via library APIs). Onwards! I plan to expand this DIY project by adding timers for LED animation, adding additional LED matrices, and possibly employing the LaunchPads other I2C interface. I would also like to explore the TI RTOS at a later time in 2015. I would also like to employ switch debouncing and implement different animation modes, and harden the hardware design as suggested. Perhaps I'll update my progress as progress is made... Electric Cowboy 20141212 - TI MSP430 I2C Diagram 8x8 BiColor LED Matrix.pdf main.c
  3. Hmm, don't see attachment. I will try again... 20141210 - TI MSP430 I2C Diagram 8x8 BiColor LED Matrix.pdf
  4. Hello, I purchased a 4x bi-directional level-shifter from Adafruit (http://www.adafruit.com/products/757). I soldered the header and mounted it and the 8x8 LED Matrix to an experimenter board. I created the attached schematic diagram, 20141210 - TI MSP430 I2C Diagram 8x8 BiColor LED Matrix.pdf, to this thread. I believe the electrical connections are correct. I added blue wires (really, they are blue!). I attempted to enable I2C communications in mid-November. Although my software was not correct, I did see that the 8x8 LED Matrix was "alive", because some of the LEDs in the Matrix illuminated; this is certainly a good sign. I will continue to try changes to my software and will update the thread soon. (Full-time job takes precendence over hobbies...) Is anyone in the community willing to eye-ball and check my attached schematic diagram? Thanks in advance. Electric Cowboy
  5. Many thanks Zeke! I now see in the ht16k33 datasheet, page 6, that the input voltage for the SDL and SDA is typically VDD, which is 5V in my case. Indeed, I need pull up resistor or the Logic Level Converter that you mentioned (Adafruit product 757). Ok, so I will order the Logic Level Converter and suspend my project until I can get it on my experimental board. But I'll sure to post my progress moving forward. I can't be the only person interested in this area. With kind regards, Electric Cowboy!
  6. The external I2C device I wish to connect is Adafruit Bicolor LED Square Pixel Matrix with I2C Backpack at the following: http://www.adafruit.com/product/902 I have attached the Holtek HT16K33 datasheet, ht16K33v110.pdf, to this forum thread. My four hardware connections include: 5V to the Matrix device VCC (Operating voltage is 4.5V to 5.5V) GND to the Matrix device GND P4.1 I2C SDA to the Matrix device SDA P4.2 I2C SCL to the Matrix device SCL No, I have not yet inserted any pull-up resistors between the MSP430 and the Matrix Device. What resistor value should I use? I am using an experimenter board and can add resistors (if I can acquire them...) The Matrix device's slave address is 0x70 and is hard-wired (confirmed). The Matrix device's I2C clock frequency is 400kbps (confirmed). Yes, I am attempting to use the MSP430 as the Master and the Matrix device as the Slave. Therefore I am modifying a copy of the file, usci_b_i2c_ex3_masterTxSingle.c, mentioned in my thread. Background: I successfully used this Matrix device and the TI BeagleBone Black device. Now I am attempting to use the Matrix device and the TI MSP430 LaunchPad. It is a 8x8 LED matrix device that is capable of illuminating 3 colors. So it is a simple display-output type of project. The pull-up resistor comment made me think about my BeagleBone exercise. I did not use external pull-up resistors in that project. But you are saying that I need them for the TI MSP430 LaunchPad. Perhaps I was using an internal pull-up resistor on the BeagleBone that is not available on the MSP430 LaunchPad. I can't confirm; I don't know. I attached my working source file, main.c. I can step through the source file until I readh line 56 - USCI_B_I2C_masterSendSingleByte(USCI_B1_BASE,0x21); Stepping into that function, I hang in usci_b_i2c.c when polling for the transmit interrupt flag. I never escape. Below is the function call and I bolded where I hang. I am currently stymied!!!! void USCI_B_I2C_masterSendSingleByte (uint16_t baseAddress, uint8_t txData ) { //Store current TXIE status uint8_t txieStatus = HWREG8(baseAddress + OFS_UCBxIE) & UCTXIE; //Disable transmit interrupt enable HWREG8(baseAddress + OFS_UCBxIE) &= ~(UCTXIE); //Send start condition. HWREG8(baseAddress + OFS_UCBxCTL1) |= UCTR + UCTXSTT; //Poll for transmit interrupt flag. while (!(HWREG8(baseAddress + OFS_UCBxIFG) & UCTXIFG)) ; //Send single byte data. HWREG8(baseAddress + OFS_UCBxTXBUF) = txData; //Poll for transmit interrupt flag. while (!(HWREG8(baseAddress + OFS_UCBxIFG) & UCTXIFG)) ; //Send stop condition. HWREG8(baseAddress + OFS_UCBxCTL1) |= UCTXSTP; //Clear transmit interrupt flag before enabling interrupt again HWREG8(baseAddress + OFS_UCBxIFG) &= ~(UCTXIFG); //Reinstate transmit interrupt enable HWREG8(baseAddress + OFS_UCBxIE) |= txieStatus; } main.c ht16K33v110.pdf 8x8 Bi-Color LED Matrix BL-M12A883xx.pdf
  7. Hello, I want to connect my MSP-EXP430F5529LP ("MSP430") LaunchPad to an external device via I2C. Which I2C port should I use? (1) The MSP430 Quick Start Guide (slau536.pdf) includes a diagram of the BoosterPack connector showing two sets of I2C ports: -set#1- I2C - SCL - PM_UCB1SOMI - PM_UCB1SCL - P4.2 I2C - SDA - PM_UCB1SIMO - PM_UCB1SDA - P4.1 -set#2- UCB0SDA - UCB0SIMO - P3.0 UCB0SCL - UCB0SOMI - P3.1 (2) I am using the sample project, usci_b_i2c_ex3_masterTxSingle.c. MSP430ware->Libraries->Driver Library->MSP430F5xx_6xx->Example Projects->USCI_B_I2C->usci_b_i2c_ex3_masterTxSingle The source file references "USCI_B0_Base" throughout (and not "USCI_B1_Base"). Question: Should I use SCL on P4.2 and SDA on P4.1 and change all software to "USCI_B1_Base"? Question: Or should I use SCL on P3.1 and SDA on P3.0 and use "USCI_B0_Base"? If I do, do I configure the pinmux? How would I do that? It seems to me that the sample project is assuming that the I2C is connected to UCB0 (and not UCB1), but the MSP430 LaunchPad, in its standard configuration, is using UCB0 for I2C. I appreciate any help from the community! ElectricCowboy
  8. Yes, I see the set of graphs on pages 56 & 57 in the datasheet and understand the data. I also understand the purpose of drive strength. I appreciate your answer. Thank you very much Spirilis! Electric Cowboy
  9. What is the output voltage of P1.x? I am interested in two things: (1) The output voltage (2) The method I can use to answer my own question. I have the MSP-EXP430F5529LP EVM Rev1.5 in its standard configuration. I want to drive an external LED. My method so far: (1) Read the MSP430 datasheet SLAS590L. On page 54, "Output - General Purpose I/O (Full Drive Strength)" and page 55, "Output - General Purpose I/O (Reduced Drive Strength)", I see that Vcc is either {1.8V, 3.0V}. (2) Read the EVM User Guide SLAU533B. On page 12, I see that 3.3V powering the MSP430. On page 56, I see the schematic with 3.3V powering DVCC1 and DVCC2. On page 57, I see the User LED on P1.0, but there is no additional information. (3) Read the 43oh forum. I did so but could not find the answer to my question. I'm guessing that the output voltage of P1.x is equal to Vcc. On the EVM, Vcc is 3.3V which is well within the maximum operating limits. I am guessing that the datasheet is listing Vcc=1.8V and Vcc=3V, but Vcc can be set anywhere in the maximum operating range. Thanks, Electric Cowboy
  • Create New...