Jump to content
43oh

LCD Screen via UART on a Stellaris Launchpad TM4C123G?


Recommended Posts

Is there a way to use the SoftwareSerial library on the Stellaris Launchpad TM4C123GXL board? I am trying to connect a Sparkfun serial enabled LCD screen to the board but the SoftwareSerial library is only compatible with 20, 16, and 8 MHz processors, and the TM4C123GXL is an 80 MHz chip. How can I use this LCD screen with the Stellaris Launchpad over a UART connection? Do I need to use SoftwareSerial or can I do without it?  I am programming in Energia 0101E0017 on Windows 7 64 bit. Any help is greatly appreciated, thanks!

Link to post
Share on other sites

Ermahgerd... Thank you for your patience and willingness to help a total noob. I've spent a lot of hours trying to get an LCD to work with a TI board, when in fact it was so simple. Thank you very much for helping, Rei Vilo and FMilburn.

 

For the other noobs in my position, instead of using Serial.write (which writes to serial monitor) use Serial1.write to write to TX(1) pin or Serial2.write to write to TX(2) pin, etc...

Link to post
Share on other sites
  • 5 months later...

Hello,

I am currently trying to figure out how to use a 433 MHZ RF Module with the Energia IDE.

 

The TM4C123G is connected with the Transmitter. Data is connected to TX(3) pin 34.

The MSP432 is connected to the Receiver.

I am trying to accomplish a program that sends the temperature from the TM4C123G to the MSP432. 

The TM4C123G is using a LM34DZ Temp sensor. The MSP432 is connected to a 16x2 LCD.

Her is the codes I have so far:

 

/*Transmitter (TM4C123G)*/

#include <string.h>
#include <SPI.h>

const uint8_t txaddr[] = { 0xF0,0xF0,0xF0,0xF0,0xE1 };
boolean flag = 0;


void dump_radio_status_to_serialport(uint8_t);

//initializes/defines the output pin of the LM34 temperature sensor
int outputpin= A11; // (pin # 2), use A11 analog input

//--------------------------------------------------------------------------------------

void setup()
{

Serial.begin(9600);

SPI.begin();
SPI.setDataMode(SPI_MODE0);
SPI.setBitOrder(1); // MSB-first

//----------------------------------------------------------------------------------

}
void loop() {

int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/4095.0) * 3300;
float fahrenheit= millivolts/10;

Serial3.write(fahrenheit); //send temperature varuable through tx3
delay(200);

}

 

/*Receiver*/

#include <LiquidCrystal_I2C.h>
#include <Wire.h>

#define rfReceivePin 3 //RF Receiver pin = pin 3
unsigned int data = 0; // variable used to store received data


byte address = 0x3F; // LCD I2C address
int columns = 16; // number of columns on LCD
int rows = 2; // number of rows on LCD
LiquidCrystal_I2C lcd(address, columns, rows);


//-----------------------------------------------------------------
void setup()
{
lcd.init(); // initialize the lcd 
lcd.backlight();
lcd.createChar(0, rocket); // Create Character 0
lcd.createChar(1, liftOff); // Create Character 1
}
//-----------------------------------------------------------------
void loop()

lcd.clear();
lcd.setCursor(0,0);
data=analogRead(rfReceivePin); //listen for data on pin 3
lcd.print("Temperature");


lcd.setCursor(0,1);
lcd.print(data);
delay(500); 
}

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...