I had programmed the PGA450EVM-S using the GUI .Now i want to use it into an application where it needs to be interfaced with to msp430.
I understand that the product is specifically launched for applications like car parking and stuffs and my application is same as that.
Let my clearly explain my requirement clearly ,so that someone can help me.
I want to make a kind of parking aid for cars.
Whenever an obstacle less than 1 metre is detected ,it starts beeping and as the car moves still backwards ,the intensity of the beep sound increases.
For this ,following was my plan but doesn't work.
I used msp430fr6989 launchpad and tm4c1294 launchpad in my application.
Buzzers were used to create a simple alarm.
A switch for turning on my application.
I planned to use the TIDA-00151 ultrasonic sensor since it is more accurate and detects long distance.
I programmed it with the help of GUI.
I followed all the steps in the datasheet and it was great that it worked while testing.
According to the datasheet,i observed the readings in the UART test tab .Then based on those readings ,i calculated the tof and then the distance .To my surprise it showed me correct distance readings.
Everything worked fine .
Now the sensor needs to be interfaced with any energia compatible microcontroller launchpad..example:msp430,tm4c1294 and i am clueless on my next step
Please help me ,
I made few attempts :
connected the tx and rx pins of the sensor with the rx and tx pins on the uart of msp430 and tm4c1294.
Then i coded the micro controller with the help of the energia.
I uploaded the following code and opened the serial monitor.My objective was to receive the MSB and LSB and the uart checksum value but it deliberately failed.Even i think the UART connection failed.
void setup()
{
Serial5.begin(19200);
Serial.begin(9600);
}
void loop()
{
int sensor1;
byte message[] = {0x00,0x55,0x11,0x02,0x00 };
Serial5.write(message, sizeof(message));
sensor1=Serial5.read();
Serial.print(sensor1);
Serial.println();
}
5th and the 8th pin on the tm4c1294 are the UART 5 as per the tm4c1294 datasheet.
I have never before worked on UART.