Jump to content

Search the Community

Showing results for tags 'Flash Memory'.



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.


Found 4 results

  1. 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; }
  2. C2000:Problem with flash memory

    I bought C2000 a 1 week ago. I started working today, have been working from last 6 hours. Problem is when ever I flash the program into the C2000 it gets uploaded but whenever I press reset button then program gets lost. All this is happening in Energia IDE. Correct me if I am doing something wrong. Reply asap Thank You
  3. Hello All, I would like to add a flash memory support to the MSP430. Can you please advise on how to accomplish that and if the MCU will manageable to handle the Flash memory. Utlimately, I would to offer the possibility to upload to/download from the Flash memory via BlueTooth. Please advise on how it would be possible to extend the capabilities and connecting an additional suite of components to accomplish that . Thank You , Really appreciate it. Red,
  4. Storing IR codes in flash memory

    Hi, i'm trying to make IR controlled relay board with programmable button to change IR remote codes, The IRremote library returning decoded infrared values in unsigned long type, when i try to write raw code in flash memory (energia mspflash.h library ) i get result similar to :
×