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

Problem with msp430, LCD16x2 and ADC

Recommended Posts

Greetings!

 

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); 

  lcd.print(potValor); 

}

 

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

 

 

problem+adc+and+lcd.png

 


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

 

error.png

 


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.

 

Robert

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  

×