Jump to content

Search the Community

Showing results for tags 'F5529'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 15 results

  1. As an electrical engineering student at John Brown University, we were tasked with creating a useful product or service using the combined skills gained through our embedded systems class. As someone who likes interior decorating and hates mismatched paint, I came up with the idea to make an RGB color sensor attachment for a camera. Of course converting RGB data to paint colors is not conventional, it is something that could potentially be viable. To make things interesting and for the experience of working with a Raspberry Pi, I used a raspberry Pi camera to act as the base for the project. A KMASHI 10,000mAh power bank was used as the power source to make it portable and act as a psuedo case to strap all of the components together. It is definitely not elegant in any way, shape, or form, but it is more experience for me and hopefully you can find an interesting tid bit here or there in my documentation! Enjoy! RGBColorSensorAttatchmentRPI.docx
  2. Hello guys i have a project at my school were i need to make an energy metter with a msp430f5529 and a hardware part i did all the code myself and the hardware part (current metters,voltage divider etc), (i know is rudimental and ineffective) , the code and the montage works well and does everything i need it to do.Now my professor asked me to save "energie1" and "energie2" so when my microcontroler runs out of battery this 2 variables are saved , i read a lot of threds but i can't figure it out.Here is the code if it helps ( i can provide you with hardware montage if needed). #include <Wire.h> #include "LiquidCrystal_I2C.h" byte address = 0x27; // LCD I2C address int columns = 20; // number of columns on LCD int rows = 2; // number of rows on LCD LiquidCrystal_I2C lcd(address, columns, rows); long previousMillis = 0; long previousMillis1 = 0; int timp; int sensorPin = 23; int sensorValue = 0; float volt; byte newChar1[] = { B11111, B10001, B10001, B10001, B10001, B10001, B10001, B11111 }; byte newChar2[] = { B00000, B00000, B11100, B11100, B11100, B11100, B00000, B00000 }; byte newChar3[] = { B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111 }; int sensorPin1 = 24; int sensorValue1 = 0; float amp1; int sensorPin2 = 25; int sensorValue2 = 0; float amp2; float putere1; float total_putere1; float energie1; float media_puteri1; float putere2; float total_putere2; float energie2; float media_puteri2; long interval = 1000; long interval1=270; const int buttonPin = PUSH2; int buttonPushCounter = 0; int buttonState = 0; int lastButtonState = 0; void setup() { lcd.init(); pinMode(buttonPin, INPUT_PULLUP); lcd.createChar(0, newChar1); lcd.createChar(1, newChar2); lcd.createChar(2, newChar3); } void loop() { buttonState = digitalRead(buttonPin); sensorValue = analogRead(sensorPin); sensorValue1 = analogRead(sensorPin1); sensorValue2 = analogRead(sensorPin2); unsigned long currentMillis = millis(); unsigned long currentMillis1 = millis(); timp=currentMillis/1000; if(currentMillis - previousMillis > interval) { previousMillis = currentMillis; volt=sensorValue; volt=(volt*3.3)/4096; volt=volt*8.51; amp1=sensorValue1; amp1=(amp1*3.3)/4096; if(amp1<0.5) amp1=0; amp1=amp1/0.5; amp2=sensorValue2; amp2=(amp2*3.3)/4096; amp2=amp2/0.05; if(amp2<1.25) amp2=0; putere1=volt*amp1; putere2=volt*amp2; total_putere1=putere1+total_putere1; total_putere2=putere2+total_putere2;} if (buttonState == LOW) { lcd.backlight(); } else lcd.noBacklight(); if(currentMillis1 - previousMillis1 > interval1) { previousMillis1 = currentMillis1; if(buttonPushCounter==1){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Battery Voltage"); lcd.setCursor(0,1); lcd.print(volt); lcd.print(" V");} if(buttonPushCounter==2){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Solar Current"); lcd.setCursor(0,1); lcd.print(amp1); lcd.print(" A");} if(buttonPushCounter==3){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Pump Current"); lcd.setCursor(0,1); lcd.print(amp2); lcd.print(" A");} if(buttonPushCounter==4){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Solar Energy"); lcd.setCursor(0,1); lcd.print(energie1); lcd.print(" Wh");} if(buttonPushCounter==5){ lcd.clear(); lcd.setCursor(0,0); lcd.print("Pump Energy"); lcd.setCursor(0,1); lcd.print(energie2); lcd.print(" Wh");} if(buttonPushCounter==6){ lcd.clear(); if(volt>12.6){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("100"); lcd.print("%");} if(volt<12.45 && volt>12.21){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("80"); lcd.print("%");} if(volt<12.20 && volt>11.91){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(2); lcd.write(0); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("60"); lcd.print("%");} if(volt<11.90 && volt>11.60){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(2); lcd.write(0); lcd.write(0); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("40"); lcd.print("%");} if(volt<11.59){ lcd.clear(); lcd.setCursor(0,1); lcd.write(2); lcd.write(0); lcd.write(0); lcd.write(0); lcd.write(0); lcd.write(1); lcd.setCursor(0,0); lcd.print("State Of Charge"); lcd.setCursor(6,1); lcd.print("20"); lcd.print("%");}} if(buttonPushCounter>6) buttonPushCounter=1;} if (buttonState != lastButtonState) { if (buttonState == HIGH) { buttonPushCounter++;}} lastButtonState = buttonState; media_puteri1=total_putere1/timp; energie1=media_puteri1*timp/3600; media_puteri2=total_putere2/timp; energie2=media_puteri2*timp/3600; }
  3. I've been playing with Adafruit's ADXL345 accelerometer BOB and was able to import and run the Adafruit library code without any edits. Sweet...
  4. 2 years ago I had a small project using a F5529 LP with TMP006 sensor booster pack, connecting to an OpenWRT router using serial to send data to ti.exosite.com, and also a 16x2 LCD readout. Last month it suddenly stopped sending data. Trouble shooting confirmed the problem is at the serial part on the LP. The LP also refused being re-programmed during the trouble shooting tests. The F5529, TMP006, and OpenWRT are all confirmed working flawlessly. Another lost feature is the ability to show time on the LCD which it retrieves from exosite everytime data is sent successfully. A nice clock also really. Today, after two weeks, it suddenly come back to life! Hurray!
  5. Hi, I have an MSP430 F5529 LaunchPad, R1.6. I am trying to use the Wire library to access I2C BoosterPacks. The problem is that the Wire library is accessing the I2C0 interface on pins 14 and 15, while the BoosterPack is connected to I2C1, on pins 9 and 10. How do I select which I2C interface the Wire library uses? I tried using Wire0 and Wire1, but these result in a compiler error -- Wire is the only object defined. Aren't pins 9 and 10 preferred for the I2C interface according to the suggested pinout? If so, then shouldn't the Wire library default to using this interface? Thanks for any info or insight!
  6. Hello everyone! Just wanted to say thank you for all the support and guidance everyone in this forum has towards beginners, you guys have been of so much help!! Now, here is a question: I am trying to interface 2 microcontrollers, a MSP430F5529 with a C2000 F28335 I was told the MSP doesnt support CAN, I would have to convert SPI to CAN and go from there. What do you guys suggest? I have never successfully used communication protocols. Any good examples of send and receive out there? Thanks in advance!
  7. SvdSinner

    SMCLK and HardwareSerial

    I've got an F5229LP app that sets SMCLK to XT2 with a divider of 4. (XT2 = 25Mhz crystal, which is also the source for MCLK) When I initialize the clocks, HardwareSerial no longer produces an accurate Baud Rate, and it breaks terminal communication. I see that HardwareSerial.cpp contains: #define SMCLK F_CPU //SMCLK = F_CPU for now I've tried changing it to F_CPU / 4 but the situation did not improve. Here is my recreation code: (Uncomment initClocks(25000000l); and change HardwareSerial.cpp to see it fail) #include <WString.h> void initClocks(uint32_t mclkFreq); void SerialTestText() { Serial.println("Back channel active."); char* selfTest = (char*) ("Performing Self Test."); while (*selfTest) Serial.print(*selfTest++); Serial.println(selfTest); } void setup() { // put your setup code here, to run once: // initClocks(25000000l); Serial.begin(115200); delay(10); //Turn on LED pinMode(RED_LED, OUTPUT); digitalWrite(RED_LED, true); Serial.println(' ');//Sacrificial character. (First character is often garbled.) SerialTestText(); } int _previous = 0; void loop() { // put your main code here, to run repeatedly: int _now = millis()/2000; digitalWrite(RED_LED, (int)(millis()/500) & 0x1); if (_previous != _now) SerialTestText(); _previous = _now; } void initClocks(uint32_t mclkFreq) { #ifdef __MSP430F5529__ //Enable XT2 P5SEL |= BIT3 + BIT2; UCSCTL6 &= ~XT2OFF; delay(100); //Give time for XT2 to settle // Assign the XT1 as the FLL reference clock UCSCTL3 &= ~0x7; UCSCTL3 |= 0x2;//FLL reference clock divider of 1 // Assign the XT2 as the MCLK reference clock UCSCTL4 &= ~0x7;//MCLK source bits UCSCTL4 |= 0x5;//Source = XT2 when available otherwise DCOCLKDIV UCSCTL5 &= ~0x7;//Clock divider of 1 (25Mhz) // Assign the XT2 as the SMCLK reference clock UCSCTL4 &= ~0x70; UCSCTL4 |= 0x50;//SMCLK UCSCTL5 &= ~0x70; UCSCTL5 |= 0x10; //Clock divider of 4 (6.25Mhz) // Assign the XT1 as the source for ACLK UCSCTL4 &= ~0x700; UCSCTL4 |= 0x100;//ACLK UCSCTL5 &= ~0x700; UCSCTL5 |= 0x100; //Clock divider of 16 (~4khz) #endif } How do I use HardwareSerial with a custom value of SMCLK?
  8. This piece of code was made possible by Trey German, Robert Wessels, and Cathy Wicks of Texas Instruments. Without Trey's knowledge and Cathy's encouragement, I wouldn't have been able to make this program. Robert is the one who told me about this project. When creating 430AlarmClock, I adhered to my usual procedure for designing programs: 0. Make a general outline 1. Get the hardware 2. Write the basic stuff 3. Tweak, test, repeat until it works 4. Add/remove/tweak more advanced features until you are satisfied 5. Publish, add license, do whatever else you need to do I made the outline first. It looked like this: 430AlarmClock.zip
  9. 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
  10. According to the docs, it takes ~100 microseconds: http://energia.nu/AnalogRead.html. I measured this and it seems to be almost exactly 100 microseconds. Why does it take so long? This limits me to 10kHz sample speed. By the way, how fast have any of you guys sampled on the ADC12 of F5529?
  11. I'm trying to create an interface to collect data from some sensors using MSP-EXP430F5529LP. The sensor setup is powered with 3.3V and draws about 10mA. I noticed J10 on the LP has 3.3V and GND. When powered with USB, can this provide enough power? If not, I'll need to hook up VREF+ and VREF-. According to the data sheets these are pins P5.0 and P5.1. How can I hook up to these, as they don't seem to have a place on the 40-pin headers?
  12. Everyone knows my obsession with building an ECU for my motorcycle. I think I'm far enough along with it, so here's where I'm at. It's based on the 40 pin BP headers and I believe should be compatible with the F5529 and TM4C123 LP's and maybe more. I still have to code for it but that will come when I'm satisfied with the hardware. The BP will sit on top of this board with its USB plug facing away from the 25 pin plug, and has the I2C and SPI ports left unused which would provide for a display, data logging or other devices to interface with it. Eagle files attached as well. 4 low-impedance / peak-and-hold injector drivers based on LM1949 driver chips, 4 logic level outputs suitable for triggering GM/Delphi LS-type coils (LS1, LS2, D514A, et cetera) or external circuitry, samples manifold pressure, throttle position, and intake air and coolant temperature sensors as well as battery voltage for injector duration compensation and the 5v sensor rail and two additional 'extra' analog inputs. There may be some layout revisions which might possibly lead to more outputs for user-defined externals. MSPEFI.brdMSPEFI_B3.sch
  13. From the recent email received from TI announcing their new Connected LaunchPad line, I noticed the free partner service offered to Exosite. It is really cool to have the services of this kind, easy to configure for such a sophisticated communication platform. My only problem is I don't have one of those new shinny Connected LP.. actually TI won't sell those to where I live. But that doesn't stop my drive to test out this new exciting cloud! Firstly, an F5529LP with TI TMP006 temperature booster pack was selected as the test rig. This was a small project from last month that also with a 1602 LCD. The coding is done in Energia. Although the LCD shows a lot of info, including sensor temperature and die temperature, together with their min / max, the data output from serial is currently limited to the sensor temperature only. The F5529+TMP006+LCD package is connected to a TP-Link WR703N wireless router with OpenWRT. Every 4 seconds the LP send the sensor temperature through serial to the OpenWRT. This router is installed with ser2net package and a lua program is running to capture that value, and then send to Exosite. (Yes that is a Haagen Dazs behind the LP.. to make sure temperature below 0C worked as well as no shortage of dessert tonight..) The whole Exosite experience is pretty nice. It only takes less than half hour from opening a new account to have the site ready to receive data, that already include reading the documentation on how to send data with their simple HTTP protocol. For the 703N router, apart from the package ser2net, a small lua program that required the lua socket package (easily installed in the standard way - opkg install luasocket), included below is used to capture the output from ser2net, do some legwork, and finally send data to Exosite: local host, port = "127.0.0.1", 2002 local socket = require("socket") local tcp = assert(socket.tcp()) tcp:connect(host, port); while true do local s, status, partial = tcp:receive() print(s or partial) if status == "closed" then break end local socket = require("socket") local host = "m2.exosite.com" local sock = assert(socket.connect(host, 80)) sock:send("POST /api:v1/stack/alias HTTP/1.1\r\n") sock:send("Host: m2.exosite.com\r\n") sock:send("Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n") sock:send("X-Exosite-CIK: secret-exosite-token-here\r\n") sock:send("Content-Length: 8\r\n\r\n") sock:send("s=") sock:send(s) sock:send("\r\n\r\n\r\n") repeat local chunk, status, partial = sock:receive(64) print(chunk or partial) until status ~= "closed" sock:close() end tcp:close() It is quite an enjoyable experience to have little things connected to the Internet In summary: TMP006 -(I2C)-> LP5529 -(serial)-> 703N/ser2net -(socket)-> 703N/lua -(http)-> Exosite
  14. I still don't have a new F5529 Launchpad but wanted to tinker a bit more with Energia. Added another variant to use the MSP-EXP430F5529 http://www.ti.com/tool/msp-exp430f5529 It is not complete but the leds, buttons, i2c, and debug uart are all working. Next is wrapping up the timers then adding drivers for the on-board LCD, SD and Accelerometer. Add this to /energia/hardware/msp430/boards.txt lpmsp430f5529_25.name=exp-msp430f5529 (25MHz) lpmsp430f5529_25.upload.protocol=tilib lpmsp430f5529_25.upload.maximum_size=131072 lpmsp430f5529_25.build.mcu=msp430f5529 lpmsp430f5529_25.build.f_cpu=25000000L lpmsp430f5529_25.build.core=msp430 lpmsp430f5529_25.build.variant=exp_f5529 lpmsp430f5529_25.upload.maximum_ram_size=1024 And create /energia/hardware/msp430/variants/exp_f5529/pins_energia.h /* ************************************************************************ * pins_energia.h * * Energia core files for MSP430 * Copyright (c) 2012 Robert Wessels. All right reserved. * * Contribution: Rei VILO * *********************************************************************** Derived from: pins_arduino.h - Pin definition functions for Arduino Part of Arduino - http://www.arduino.cc/ Copyright (c) 2007 David A. Mellis This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef Pins_Energia_h #define Pins_Energia_h #ifndef BV #define BV(x) (1 << (x)) #endif #if defined(__MSP430_HAS_USCI_A0__) || defined(__MSP430_HAS_USCI_A1__) static const uint8_t SS = 8; /* P2.7 */ static const uint8_t SCK = 7; /* P3.2 */ static const uint8_t MOSI = 15; /* P3.0 */ static const uint8_t MISO = 14; /* P3.1 */ static const uint8_t TWISDA = 37; /* P3.0 */ static const uint8_t TWISCL = 26; /* P3.1 */ static const uint8_t DEBUG_UARTRXD = 2; /* Receive Data (RXD) at P4.5 */ static const uint8_t DEBUG_UARTTXD = 3; /* Transmit Data (TXD) at P4.4 */ static const uint8_t AUX_UARTRXD = 2; /* Receive Data (RXD) at P4.5 */ static const uint8_t AUX_UARTTXD = 3; /* Transmit Data (TXD) at P4.4 */ #define TWISDA_SET_MODE (PORT_SELECTION0) #define TWISCL_SET_MODE (PORT_SELECTION0) #define DEBUG_UARTRXD_SET_MODE (PORT_SELECTION0 | (PM_UCA1RXD << 8) | INPUT) #define DEBUG_UARTTXD_SET_MODE (PORT_SELECTION0 | (PM_UCA1TXD << 8) | OUTPUT) #define AUX_UARTRXD_SET_MODE (PORT_SELECTION0 | INPUT) #define AUX_UARTTXD_SET_MODE (PORT_SELECTION0 | OUTPUT) #define SPISCK_SET_MODE (PORT_SELECTION0) #define SPIMOSI_SET_MODE (PORT_SELECTION0) #define SPIMISO_SET_MODE (PORT_SELECTION0) #endif #define DEBUG_UART_MODULE_OFFSET 0x40 #define AUX_UART_MODULE_OFFSET 0x0 #define SERIAL1_AVAILABLE 1 #if defined(__MSP430_HAS_USCI_A1__) #define USE_USCI_A1 #endif static const uint8_t A0 = 0; static const uint8_t A1 = 1; static const uint8_t A2 = 2; static const uint8_t A3 = 3; static const uint8_t A4 = 4; static const uint8_t A5 = 5; static const uint8_t A6 = 6; static const uint8_t A7 = 7; static const uint8_t A10 = 10; // special. This is the internal temp sensor static const uint8_t A11 = 11; static const uint8_t A12 = 12; static const uint8_t A13 = 13; static const uint8_t A14 = 14; static const uint8_t A15 = 15; /* F5529 LaunchPad pin mapping ( * indicates redundancy) J4 +--\/--+ 3.3v |1 12| P6.6 (CB6, A6) (UCA1RXD/SOMI) P4.5 |2 11| P8.1 (GPIO - LED2) (UCA1TXD/SIMO) P4.4 |3 10| P8.2 (GPIO - LED3) (GPIO - RF) P4.6 |4 9| P8.0 (GPIO - POT) (GPIO - RF) P4.7 |5 *| P4.5 (UCA1RXD/SOMI) (A9) P5.1 |6 *| P4.4 (UCA1TXD/SIMO) GND |7 8| P6.7 (CB7, A7) +------+ */ /* J5 +--\/--+ 3.3v |13 24| P7.0 (CB8, A12) (UCB1SOMI/SCL - SD) P4.2 |14 23| P7.1 (CB9, A13) (UCB1SIMO/SDA - LCD/SD) P4.1 |15 22| P7.2 (CB10, A14) (UCB1CLK/UCA1STE - LCD/SD) P4.3 |16 21| P7.3 (CB11, A15) (UCB1STE/UCA1CLK - RF) P4.0 |17 *| P4.1 (UCB1SIM0/UCB1SDA - LCD/SD) (TB0OUTH, SVMOUT - SD) P3.7 |18 *| P4.2 (UCB1SOMI/UCB1SCL - SD) GND |19 20| P7.7 (TB0CLK) +------+ */ /* J12 +--\/--+ (UCB0STE - RF) P2.6 |25 37| P3.0 (UCB0SIMO - RF) (UCB0SOMI - RF) P3.1 |26 36| P3.2 (UCB0CLK - RF) (TA2.0 - RF_GDO0) P2.3 |27 35| P2.1 (TA1.2 - RF_GDO2) (TB0.3) P7.5 |28 34| GND (GPIO) P4.7 |* 33| P2.4 (TA2.1) (UCA1RXD/SOMI) P4.5 |* *| P4.6 (GPIO) (UCA1TXD/SIMO) P4.4 |* *| P4.0 (UC 1) (GPIO - LED2) P1.0 |29 32| P2.0 (TA1.1) GND |30 31| VCC +------+ */ /* ----+ 38| P1.7 (PUSH1) 39| P2.2 (PUSH2) *29| P1.0 (LED1) *11| P8.1 (LED2) *10| P8.2 (LED3) *9| P8.0 (POT_EN) 40| P6.5 (POT_READ - A5) TOUCHPADS 41| P1.1 (TA0.0) 46| P6.0 (CB0) 42| P1.2 (TA0.1) 47| P6.1 (CB1) 43| 53| P1.3 (TA0.2) 48| P6.2 (CB2) 44| P1.4 (TA0.3) 49| P6.3 (CB3) 45| P1.5 (TA0.4) 50| P6.4 (CB4) */ /* ACCEL-UCA0 51| P3.6 (ACCEL_PWR) 52| P3.4 (ACCEL_SOMI) 53| P3.3 (ACCEL_SIMO) 54| P2.7 (ACCEL_SCLK) 55| P2.5 (ACCEL_INT) 56| P3.5 (ACCEL_CS) ezFET-UCA1 *2| P4.5 (UCA1RXD -> ezFET -> Serial) *3| P4.4 (UCA1TXD -> ezFET -> Serial) */ /* LCD-UCB1 57| P5.7 (LCD_RST) *15| P4.1 (LCD_SIMO) *16| P4.3 (LCD_SCLK) 58| P5.6 (LCD_D/C) 59| P7.4 (LCD_CS) 60| P7.6 (LCD_BL_EN) SD-UCB1 *14| P4.2 (SD_SOMI - DO) *15| P4.1 (SD_SIMO - DI) *16| P4.3 (SD_SCLK) *18| P3.7 (SD_CS) ----+ */ /* Pin names based on the silkscreen */ /* PIN1 = 3.3v */ static const uint8_t P4_5 = 2; static const uint8_t P4_4 = 3; static const uint8_t P4_6 = 4; static const uint8_t P4_7 = 5; static const uint8_t P5_1 = 6; /* PIN7 is GND */ static const uint8_t P6_7 = 8; static const uint8_t P8_0 = 9; static const uint8_t P8_2 = 10; static const uint8_t P8_1 = 11; static const uint8_t P6_6 = 12; /* PIN13 = 3.3v */ static const uint8_t P4_2 = 14; static const uint8_t P4_1 = 15; static const uint8_t P4_3 = 16; static const uint8_t P4_0 = 17; static const uint8_t P3_7 = 18; /* PIN19 is GND */ static const uint8_t P7_7 = 20; static const uint8_t P7_3 = 21; static const uint8_t P7_2 = 22; static const uint8_t P7_1 = 23; static const uint8_t P7_0 = 24; static const uint8_t P2_6 = 25; static const uint8_t P3_1 = 26; static const uint8_t P2_3 = 27; static const uint8_t P7_5 = 28; static const uint8_t P1_0 = 29; /* PIN30 is GND */ /* PIN31 = 3.3v */ static const uint8_t P2_0 = 32; static const uint8_t P2_4 = 33; /* PIN34 is GND */ static const uint8_t P2_1 = 35; static const uint8_t P3_2 = 36; static const uint8_t P3_0 = 37; static const uint8_t P6_5 = 40; /* Extra pins not on the header + temp sensor */ static const uint8_t PUSH1 = 38; static const uint8_t PUSH2 = 39; static const uint8_t RED_LED = 29; static const uint8_t GREEN_LED = 10; static const uint8_t ORANGE_LED = 11; static const uint8_t POT_ENABLE = 9; static const uint8_t POT_ANALOG = 40; static const uint8_t TEMPSENSOR = 10; #ifdef ARDUINO_MAIN const uint16_t port_to_input[] = { NOT_A_PORT, (uint16_t) &P1IN, (uint16_t) &P2IN, #ifdef __MSP430_HAS_PORT3_R__ (uint16_t) &P3IN, #endif #ifdef __MSP430_HAS_PORT4_R__ (uint16_t) &P4IN, #endif #ifdef __MSP430_HAS_PORT5_R__ (uint16_t) &P5IN, #endif #ifdef __MSP430_HAS_PORT6_R__ (uint16_t) &P6IN, #endif #ifdef __MSP430_HAS_PORT7_R__ (uint16_t) &P7IN, #endif #ifdef __MSP430_HAS_PORT8_R__ (uint16_t) &P8IN, #endif }; const uint16_t port_to_output[] = { NOT_A_PORT, (uint16_t) &P1OUT, (uint16_t) &P2OUT, #ifdef __MSP430_HAS_PORT3_R__ (uint16_t) &P3OUT, #endif #ifdef __MSP430_HAS_PORT4_R__ (uint16_t) &P4OUT, #endif #ifdef __MSP430_HAS_PORT5_R__ (uint16_t) &P5OUT, #endif #ifdef __MSP430_HAS_PORT6_R__ (uint16_t) &P6OUT, #endif #ifdef __MSP430_HAS_PORT7_R__ (uint16_t) &P7OUT, #endif #ifdef __MSP430_HAS_PORT8_R__ (uint16_t) &P8OUT, #endif }; const uint16_t port_to_dir[] = { NOT_A_PORT, (uint16_t) &P1DIR, (uint16_t) &P2DIR, #ifdef __MSP430_HAS_PORT3_R__ (uint16_t) &P3DIR, #endif #ifdef __MSP430_HAS_PORT4_R__ (uint16_t) &P4DIR, #endif #ifdef __MSP430_HAS_PORT5_R__ (uint16_t) &P5DIR, #endif #ifdef __MSP430_HAS_PORT6_R__ (uint16_t) &P6DIR, #endif #ifdef __MSP430_HAS_PORT7_R__ (uint16_t) &P7DIR, #endif #ifdef __MSP430_HAS_PORT8_R__ (uint16_t) &P8DIR, #endif }; const uint16_t port_to_ren[] = { NOT_A_PORT, (uint16_t) &P1REN, (uint16_t) &P2REN, #ifdef __MSP430_HAS_PORT3_R__ (uint16_t) &P3REN, #endif #ifdef __MSP430_HAS_PORT4_R__ (uint16_t) &P4REN, #endif #ifdef __MSP430_HAS_PORT5_R__ (uint16_t) &P5REN, #endif #ifdef __MSP430_HAS_PORT6_R__ (uint16_t) &P6REN, #endif #ifdef __MSP430_HAS_PORT7_R__ (uint16_t) &P7REN, #endif #ifdef __MSP430_HAS_PORT8_R__ (uint16_t) &P8REN, #endif }; const uint16_t port_to_sel0[] = { /* put this PxSEL register under the group of PxSEL0 */ NOT_A_PORT, (uint16_t) &P1SEL, (uint16_t) &P2SEL, #ifdef __MSP430_HAS_PORT3_R__ (uint16_t) &P3SEL, #endif #ifdef __MSP430_HAS_PORT4_R__ (uint16_t) &P4SEL, #endif #ifdef __MSP430_HAS_PORT5_R__ (uint16_t) &P5SEL, #endif #ifdef __MSP430_HAS_PORT6_R__ (uint16_t) &P6SEL, #endif #ifdef __MSP430_HAS_PORT7_R__ (uint16_t) &P7SEL, #endif #ifdef __MSP430_HAS_PORT8_R__ (uint16_t) &P8SEL, #endif }; const uint16_t port_to_pmap[] = { NOT_A_PORT, /* PMAP starts at port P1 */ NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, (uint16_t) &P4MAP0, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, }; const uint8_t digital_pin_to_timer[] = { NOT_ON_TIMER, /* dummy */ NOT_ON_TIMER, /* 1 - 3.3v */ T0B0, /* 2 - P5.6 */ NOT_ON_TIMER, /* 3 - P3.4 */ NOT_ON_TIMER, /* 4 - P3.3 */ NOT_ON_TIMER, /* 5 - P1.6 */ NOT_ON_TIMER, /* 6 - P6.6 */ NOT_ON_TIMER, /* 7 - P3.2 */ NOT_ON_TIMER, /* 8 - P2.7 */ NOT_ON_TIMER, /* 9 - P4.2 */ NOT_ON_TIMER, /* 10 - P4.1 */ NOT_ON_TIMER, /* 11 - P8.1 */ T2A0, /* 12 - P2.3 */ NOT_ON_TIMER, /* 13 - P2.6 */ NOT_ON_TIMER, /* 14 - P3.2 */ NOT_ON_TIMER, /* 15 - P3.0 */ NOT_ON_TIMER, /* 16 - RST */ T0B2, /* 17 - P7.4 */ NOT_ON_TIMER, /* 18 - P2.2 */ T1A1, /* 19 - P2.0 */ NOT_ON_TIMER, /* 20 - GND */ NOT_ON_TIMER, /* 21 - 5.0v */ NOT_ON_TIMER, /* 22 - GND */ NOT_ON_TIMER, /* 23 - P6.0 */ NOT_ON_TIMER, /* 24 - P6.1 */ NOT_ON_TIMER, /* 25 - P6.2 */ NOT_ON_TIMER, /* 26 - P6.3 */ NOT_ON_TIMER, /* 27 - P6.4 */ NOT_ON_TIMER, /* 28 - P7.0 */ T0B6, /* 29 - P3.6 */ T0B5, /* 30 - P3.5 */ NOT_ON_TIMER, /* 31 - P8.2 */ NOT_ON_TIMER, /* 32 - P3.7 */ NOT_ON_TIMER, /* 33 - P4.0 */ NOT_ON_TIMER, /* 34 - P4.3 */ T0A1, /* 35 - P1.2 */ T0A2, /* 36 - P1.3 */ T0A3, /* 37 - P1.4 */ T0A4, /* 38 - P1.5 */ T2A1 /* 39 - P2.4 */ }; const uint8_t digital_pin_to_port[] = { NOT_A_PIN, /* dummy */ NOT_A_PIN, /* 1 */ P4, /* 2 */ P4, /* 3 */ P4, /* 4 */ P4, /* 5 */ P5, /* 6 */ NOT_A_PIN, /* 7 */ P6, /* 8 */ P8, /* 9 */ P8, /* 10 */ P8, /* 11 */ P6, /* 12 */ NOT_A_PIN, /* 13 */ P4, /* 14 */ P4, /* 15 */ P4, /* 16 */ P4, /* 17 */ P3, /* 18 */ NOT_A_PIN, /* 19 */ P7, /* 20 */ P7, /* 21 */ P7, /* 22 */ P7, /* 23 */ P7, /* 24 */ P2, /* 25 */ P3, /* 26 */ P2, /* 27 */ P7, /* 28 */ P1, /* 29 */ NOT_A_PIN, /* 30 */ NOT_A_PIN, /* 31 */ P2, /* 32 */ P2, /* 33 */ NOT_A_PIN, /* 34 */ P2, /* 35 */ P3, /* 36 */ P3, /* 37 */ P1, /* 38 */ P2 /* 39 */ }; const uint8_t digital_pin_to_bit_mask[] = { NOT_A_PIN, /* 0, pin count starts at 1 */ NOT_A_PIN, /* 1 */ BV(5), /* 2 */ BV(4), /* 3 */ BV(6), /* 4 */ BV(7), /* 5 */ BV(1), /* 6 */ NOT_A_PIN, /* 7 */ BV(7), /* 8 */ BV(0), /* 9 */ BV(2), /* 10 */ BV(1), /* 11 */ BV(6), /* 12 */ NOT_A_PIN, /* 13 */ BV(2), /* 14 */ BV(1), /* 15 */ BV(3), /* 16 */ BV(0), /* 17 */ BV(7), /* 18 */ NOT_A_PIN, /* 19 */ BV(7), /* 20 */ BV(1), /* 21 */ BV(2), /* 22 */ BV(1), /* 23 */ BV(0), /* 24 */ BV(6), /* 25 */ BV(1), /* 26 */ BV(3), /* 27 */ BV(5), /* 28 */ BV(0), /* 29 */ NOT_A_PIN, /* 30 */ NOT_A_PIN, /* 31 */ BV(0), /* 32 */ BV(4), /* 33 */ NOT_A_PIN, /* 34 */ BV(1), /* 35 */ BV(2), /* 36 */ BV(0), /* 37 */ BV(7), /* 38 */ BV(2) /* 39 */ }; #endif // #ifdef ARDUINO_MAIN #endif // #ifndef Pins_Energia_h And a simple example to read the on-board potentiometer and output to serial monitor. /* AnalogReadSerial Enables on-board potentiometer on P8.0 and reads an analog input from on-board potentiometer on A5(P6.5); prints the result to the serial monitor. Hardware Required: * MSP-EXP430F5529 (Not the F5529 LP) This example code is in the public domain. */ // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); pinMode(POT_ENABLE, OUTPUT); // set P8.0 to output digitalWrite(POT_ENABLE, HIGH); // set P8.0 high to enable Potentiometer } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin A5: int sensorValue = analogRead(A5); // print out the value you read: Serial.println(sensorValue); delay(100); // delay in between reads for stability }
  15. abecedarian

    F5529, USB and USB device classes

    Anyone experimenting with this or have any thoughts on how this could be done in Energia? I'd like to do something like this with my MAP pressure sensor thing, where the user could drag and drop (or software on the computer could save) 'tuning' files to the device and that the unit would use for mapping its pressure sensor to the DAC. If possible, I'd also like to extend this to applying firmware updates in a similar fashion.
×