Jump to content
Forum sending old emails Read more... ×
Sign in to follow this  

Problem with msp430, LCD16x2 and ADC

Recommended Posts



I'm using a potentiometer and lcd16x2 with msp430 this is my code:


#include <LiquidCrystal.h>

LiquidCrystal lcd(P1_4, P1_5, P1_0, P1_1, P1_2, P1_3);


int potPin = A7;//Potenciometer

int potValor = 0;


void setup() {

  lcd.begin(16, 2);//Using 16x2 LCD

  lcd.setCursor(0, 0); 

  lcd.print("ADC + LCD"); 




void loop() {

  potValor = analogRead(potPin); 

  lcd.setCursor(0, 1); 




I just want to see on the LCD is what I read in the analog channel, but I get the following error:





but when I comment  potValor = analogRead(potPin);  or lcd.print(potValor);  the program compiles without errors




I have seen other examples in arduino and has no problems


Any ideas?


Thank you.


Share this post

Link to post
Share on other sites

@@MrChunckuee, @@grahamf72 seems like the processor in use is indeed a 2231 looking at the screen shot bottom right.

@@MrChunckuee, is very limited on memory (2k of FLASH and 128 bytes of RAM). In your case, the application does not fit in FLASH.


In your LaunchPad box you should also have gotten an msp430 with more memory (either G2553 or G2452). If you have not then you can get a couple free samples here: http://www.ti.com/product/MSP430G2553/samplebuy

When you order samples make sure you order the PDIP package.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this