Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Hello guys i wrote a simple code with a intrerupt on button 2 on MSP430F5529 when i hit the button 2 int should save in flash but when i disconect my microcontroler the variable reset please help me. #include <Wire.h> #include "LiquidCrystal_I2C.h" #include "MspFlash.h" #define flash SEGMENT_D #define flash1 SEGMENT_C 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); int i1=20; int *pi1=&i1; int i2=0; int *pi2=&i2; int i11=30;
  2. Hello guys i'm working on an application where i need to save 2 float numbers in flash memory (i need them when the msp lose power) ,i have the hardware part done but i can't figure out the coding i'm very new to programing. I need to do something like this. int sensorPin = 23; int sensorValue = 0; float volt; // loop part sensorValue = analogRead(sensorPin); unsigned long currentMillis = millis(); timp=currentMillis/1000; if(currentMillis - previousMillis > interval) { previousMillis = currentMillis; volt=sensorValue; volt=(volt*3.3)/4096; volt=vol
  3. 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
  4. Hello guys i have msp430fr6989 with a built in lcd but i dont like it i wonder if i can attach my 16x2 lcd (1602) that i use with arduino i have a I2C communication this library : http://www.xs4all.nl/~hmario/arduino/LiquidCrystal_I2C/V1.0/LiquidCrystal_I2C_V1.0.zip and the clasic wire arduino library my scl and sda are coneccted to 4.1 and 4.0 and my vcc is 5 v from the 5 v pin but i can't upload the program.Can somebody help me pls. #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x20,20,4); // set the LCD address to 0x20 for a 20 chars and 4 line di
  • Create New...