Jump to content

Search the Community

Showing results for tags 'uart'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 75 results

  1. Hello, I'm trying to migrate my old project for MSP430G2452 from Energia 0101E0009 to the last version 1.8.7E21. However I got a lot issues. 1. Controller starts to slow - as I understood the issue is in the enableXtal() function which tries to find clock crystal, which I don't use. I just commented it out in init_clock() directly in core and it helped. 2. Actuall frequency of MCU was incorrect (It is much slower) - found answer on forum here https://forum.43oh.com/topic/13473-blink-example-too-slow/. And now it works as expected. 3. Now I'm trying to use Serial. But it seems that it has some issue too. I'm using basic scetch from example - ASCIITable and connected my oscilloscope directly to UART ( P1.1, P1.2). But unfortunatelly there is no any movement on pins. I added some basic digitalwrite command to scetch and see that program is executed, but no UART output. Of cause the same code compilled in old version of Energia works fine. What I can try else? 4. Also I use separate PCB for my project, therefore I need i2c on pins 14,15 as it was in old revisions ( default i2c was moved in to pin 9,10 as I see). But I couldn't make it work too. I tried an advice from this comment https://github.com/energia/Energia/issues/486#issuecomment-200729667, but still see nothing on my oscilloscope. I tried to download simple scetch like master-reader from examples, controller works but there are no data on SCL or SDA. I belive there is some problem with configuration but without working serial, it is hard to debug i2c. Sorry, if it is already solved in some topic, but after a day of googling and experimenting I gave up.
  2. I am using TM4C123GXL and for some reason I am getting garbage values when I try to read the values from PB1 pin. I flashed this simple code to test the UART: void setup() { // initialize ports: Serial.begin(115200); //connected with USB } void loop() { Serial.print("E"); delay(200); } But instead of 'E' I see these garbage values: ;����������� I am reading using the same 115200 baud rate. What am I doing wrong? May be I do not flash the code correctly? I simply put the device into DEBUG mode and connect to my Ubuntu PC using the top micro USB port (red LED turns on). Then I simply Upload the code to the correct Serial port and then unplug the device. EDIT: I can confirm that I flash the code correctly. I tried to flash an empty code after which nothing was sent from the UART port
  3. Hello. I have been trying to create a serial link between the Launchpad (based on tm4c123gh6pm) and my cellphone. The code is very simple for testing purpose. Here is it: /* This is a demo code for testing Bluetooth functionality ->The peripheral used here was a smartphone; and to obtain the values of 'i' on the terminal of the device, the "display mode" setting must be changed to ' HEX' ->The code doesn't work properly on when the pin 10 and 11 are used as RX and TX ->It has been successfully tested to send the values of i to the Rx terminal and receive the characters sent from there. */ int i=0; void setup() { Serial.begin(9600); Serial.print("Welcome "); } char data_from_Blue=0; //String rx_str = ""; void loop() { for(i=0;i<10;i++) { if(Serial.available()>0) { data_from_Blue = Serial.read(); // reading the data received from the bluetooth module/the peripheral (phone here) Serial.println("I received: "); Serial.println(data_from_Blue); //Serial.println(rx_str); //display it on serial monitor i.e,the reading has been received here!! } Serial.write(i); //Print incrementing value of 'i' across the other terminal(i.e, my cellphone) delay(1000); } } The code works fine for Arduino+HC05 and MSP430G2 Lauchpad Kit+HC05. But for TIVA Launchpad mentioned above, the serial monitor simply displays garbled values with '?' within boxes. I have tried almost everything. Please help me.
  4. Here are the files for my PCB Exposer/Printer, it is the complete package including mechanical design files. The printer itself. Example - a power control PCB for Raspberry Pi - 40 x 40 mm. Code includes driver for MCP4725 DAC, buffered serial port driver, stepper motor control and command parsing for the MSP430G2553 used as the main controller. Code and design files: PCB Exposer - controller code for MSP430G2553.zip PCB Exposer - desktop application.zip PCB Exposer - mechanical design files in Vectric format.zip PCB Exposer - schematics and PCBs.zip Desktop application is coded in C#, schematics and PCBs in KiCad format. There is some more information to be found in this tread: http://forum.43oh.com/topic/4990-what-are-you-doing-right-now/page-5 Terje
  5. fabytm

    G2553 UART issues

    Hey guys, I'm having some problems with my G2553 Launchpad. For some time now, the UART functionality has not functioned. I'm now sending the character "a" through the HW UART (Jumpers are positioned correctly) and what I get on my computer is completely different. I tried this in Windows 10, W7, macOS Mojave, even through the physical P1.1 and P1.2 ports to a Raspberry Pi and the result is the same. https://imgur.com/a/yd90MIw I also tried receiving data from a GPS module via UART and the data I received was unusable (the length of data was as expected, but the characters were gibberish). Has anyone had something similar happen to them?
  6. hai, am working energia at CC3220SF i need to Muti UART Communication , need to Software Serial header File GPIO or Digital Pin it possible to connect UART communication any other Example for Multiuart code at CC3220SF or CC3200 how many UART is possible to connect at CC3220SF THANKS SELVA
  7. I wanted to communicate my cc3200 with tms 57004 microcontroller using uart. So, I have connected uart_rx of tms 57004 to Uart_tx of 3200. uart_tx of tms 57004 to Uart_rx of 3200. Gnd of tms57004 to gndof cc3200. In tms 57004 I have set Baud rate to be 9600 and 1 stop bit and no parity. Can anyone tell me how to configure uart in cc3200. Regards, Gunit
  8. Hi, I'm trying out some UART communication proyects on an MSP430F5529. My question is, what number should I put instead of the x in UCAxCTL0? And where could I find this information next time (already tried the User Guide)? Thanks.
  9. I am currently trying to read a couple of parameters from onboard sensrs on TelosB, then print out on monitor which I am using PuTTY. However, I am not getting any values here. Please could some on hlep me out? I attached my code and corresponding datasheets too THank you 00std_temp.c msp430f1611.pdf telosMote.pdf
  10. Hi, How can I use UART interrupt in Energia? I tried but could not find any example or sample work.
  11. Dear Developers, I want to send data from MSP430F5529 to my Arduino Nano through UART connection. But somehow it is not working filne. I have used voltage devider circuit to convert Arduino's 5V to MSP's 3.3V. Connection Arduino's RX -> MSP's TX Arduino's TX -> MSP's RX Ground of Both -> ground of voltage devicer. Code of Arduino : const int chipSelect = 10; String inByte = " "; void setup() { // initialize both serial ports: Serial.begin(9600); } void loop() { if(Serial.available()) { char b = Serial.read(); Serial.println(b); } delay(50); } Code of MSP430F5529 void setup() { Serial.begin(9600); } void loop() { Serial.write("Hii"); delay(50); } Please Help me. Thank you.
  12. Using Tiva C Series TM4C123GH with Energia 1.6.10E18, Win7 platform. TivaC is connected by USB, of course . I really need to be able to set Serial2.begin(38400) to implement Even Parity [8E1, instead of 8N1] because of the fixed hardware that is being connected. There is a patch posted already for the MSP430G2553; I'm pretty sure the register arrangement for the Tiva C is vastly different. There's a register in the TM4C123GH at 0x4000:E02C (E000 offset 0x2C) which contains the command word for that UART (parity select, number of bits, enable FIFO, ESP, PENable) that needs to be modified during programming. I really don't want to impact the USB connection from the Tiva C back to the programming connection. Would greatly appreciate any help!
  13. Hi, I'm trying send GPS (adafruit Ultimate GPS FeatherWing) coordinates to another location using XBees and then displaying GPS data on an LCD (Sharp 96 Booster Pack) using Energia. This involves 2 pairs of Xbees (4 total 2 different ranges), 3 MSP-EXP432P401R (Black Version), the GPS and the LCD. I wrote some code for the first MSP432 on getting GPS data and getting it to the XBee to transmit to another MSP432 (connected to 2 XBees). Although I haven't been able to test it (GPS and XBees aren't here yet) I feel like it will at least be close if not functional.GPStoXBEE.ino After writing the data to the XBee which should then transmit to it's paired XBee that the 2nd MSP432 is connected to. I then want to write the incoming data to the larger ranged XBee also connected to the 2nd MSP432 shown in the following code. XBEEtoXBEE.ino I think my method is kind of right but I won't get the correct output. I believe it will only be taking one char at a time every time the readXBee function is called. So how would I make it print the entirety of the GPS data if I don't know how long/what the data will be ahead of time? I just want to transmit exactly what I'm getting from the GPS itself. Lastly I have another longer ranged XBee connected to the 3rd MSP432 along with an LCD. I want to take the GPS data that is being received from the 2nd MSP432 and print it to the display. I edited the LCD example to get the following XBEEtoLCD.ino and it kind of works, I am able to print from the serial to the display but its only one character at a time every second and the char gets overwritten by the next char. How will can I change the code so that it will print what ever is in the serial in one go? Thanks in Advance
  14. Hi I'm new to using both the MSP-EXP432P401R (Black Version) and Energia. I want to attach a GPS (adafruit Ultimate GPS FeatherWing https://www.adafruit.com/product/3133) and an XBee to the micro-controller so I can send GPS data to another MSP432 micro-controller with an XBee. I see I can attach the GPS or XBee to the hardware uart pins 3.2(Rx) and 3.3(Tx) their listed as pins 3 and 4 respectively on the Energia Pin Map (https://cloud.githubusercontent.com/assets/951776/15053945/5f47bac6-1305-11e6-9ab5-c71d425194ce.jpeg) but where can I find two other hardware pins for attaching a second the second device? Or can I use some other pins (SPI or something) to have both items connected to the micro-controller?
  15. Hello fellows, I need some help, with a situation, I want convert some analog signals to digital and send him by the UART communication, but I dont get how to solve this problem. my digital values is represented by "tempADC" variable, soo how can I get a buffer with values to the pc with UART communication. I try many things, but i dont understand how to put my output signal in the terminal in this format. temperature: 40º temperature: 41º temperature: 42º temperature: 43º can anyone help me?! my code: #include "uart_Tx.h" #include "stdio.h" void UART_TxConfig(void){ /*CLOCK SYSTEM SUPORT (CS)*/ CS->KEY = 0x695A;/*UNLOCK ALL 16 LSB CS REGISTERS*/ CS->CTL0 = 0;/*RESET PARAMETERS*/ CS->CTL0 = CS_CTL0_DCORSEL_5;/**/ /*CLOCK SYSTEM*/ /*SELA_2 ACLK = REFOCLK*/ /*SELS_3 SMCLK = DCOCLK*/ /*SELM_3 MCLK = DCOCLK*/ CS->CTL1 = CS_CTL1_SELA_2 | CS_CTL1_SELS_3 | CS_CTL1_SELM_3; /*LOCK ACESSES TO REGISTERS*/ CS->KEY = 0;/*UNLOCK ALL 16 LSB CS REGISTERS*/ /*UART PIN CONFIGURATION*/ P1-> SEL0 |= BIT2 | BIT3; /*SET 2 UART PIN's*/ /*ACTIVE INTERRUPTION's*/ __enable_interrupt(); /*ACTIVE eUSCIA0 INTERRUPT IN NVIC MODULE*/ NVIC->ISER[0] = 1 << ((EUSCIA0_IRQn) & 31); /*CONFIGURE UART*/ UCA0CTLW0 |= UCSWRST; UCA0CTLW0 |= UCSSEL__SMCLK;/*SELECT SMCLK CLOCK SOURCE*/ /*BAUD RATE CALCULATION * BAUD RATE DIVISOR (TRANSMITIONS RATE) * 12MHz/(16*9600) = 78.125 VELOCITY *FRACTIONAL PORTION = 0.125 *FRACTIONAL */ UCA0BR0 = 26; /*48000000/16/115200*/ UCA0BR1 = 0x00; UCA0MCTLW = 0x1000 | UCOS16 | 0x0020; /*CONTROL WORD REGISTER*/ UCA0CTLW0 &= ~UCSWRST; /*SOFTWARE RESET DISABLE*/ UCA0IE |=UCRXIE; while(1){ } } /*UART INTERRUPT SERVICE ROUTINE*/ void EUSCIA0_IRQHandler (void){ if (UCA0IFG & UCRXIFG){ while(!(UCA0IFG & UCTXIFG)); UCA0TXBUF = UCA0RXBUF; //UCA0TXBUF = adcTemp; //P1->OUT ^= BIT0; } }
  16. Hello, We are planning to do work on CC3200MOD LaunchpadXL. So, CC3200 GPIO/UART/ADC Energia IDE based header files can compatible in CC3200MOD? I also some confusion regarding Energia IDE based header file.Please mention below description. If you see pin_energia.h file in one array initialize for CC3200 LaunchXL like this, const uint16_t digital_pin_to_pin_num[] = { NOT_A_PIN, /* dummy */ NOT_A_PIN, /* 1 - 3.3V */ PIN_58, /* 2 - GPIO_03 */ <- pins_energia.h (CC3200) *Note : In CC3200MOD PIN_58 = GND PIN_04, /* 3 - GPIO_13 */ PIN_03, /* 4 - GPIO_12 */ PIN_61, /* 5 - GPIO_06 */ PIN_59, /* 6 - GPIO_04 */ PIN_05, /* 7 - GPIO_14 */ PIN_62, /* 8 - GPIO_07 */ PIN_01, /* 9 - GPIO_10 */ PIN_02, /* 10 - GPIO_11 */ PIN_15, /* 11 - GPIO_22 */ PIN_55, /* 12 - GPIO_01 */ PIN_21, /* 13 - GPIO_25 */ PIN_06, /* 14 - GPIO_15 */ PIN_07, /* 15 - GPIO_16 */ NOT_A_PIN, /* 16 - RESET */ PIN_45, /* 17 - GPIO_31 */ PIN_08, /* 18 - GPIO_17 */ PIN_18, /* 19 - GPIO_28 */ NOT_A_PIN, /* 20 - GND */ NOT_A_PIN, /* 21 - 5V */ NOT_A_PIN, /* 22 - GND */ PIN_57, /* 23 - GPIO_02 */ PIN_60, /* 24 - GPIO_05 */ PIN_58, /* 25 - GPIO_03 */ PIN_59, /* 26 - GPIO_04 */ PIN_63, /* 27 - GPIO_08 */ PIN_53, /* 28 - GPIO_30 */ PIN_64, /* 29 - GPIO_09 */ PIN_50, /* 30 - GPIO_00 */ PIN_17, /* 31 - GPIO_24 */ PIN_16, /* 32 - GPIO_23 */ PIN_60, /* 33 - GPIO_05 */ PIN_62, /* 34 - GPIO_07 */ PIN_18, /* 35 - GPIO_28 */ PIN_21, /* 36 - GPIO_25 */ PIN_64, /* 37 - GPIO_09 */ PIN_17, /* 38 - GPIO_24 */ PIN_01, /* 39 - GPIO_10 */ PIN_02 /* 40 - GPIO_11 */ }; github_Link : https://github.com/energia/Energia/blob/master/hardware/cc3200/variants/launchpad/pins_energia.h Here you can see highlighted portion. When you compare datasheet of CC3200 and CC3200MOD both PIN configuration are different. So, here mention pin_energia.h header file makes for CC3200. So, Is this pin_energia.h header file can support for CC3200MOD? If not then please give me a suggestion how to modify. Regards, Pratik pins_energia.h
  17. Hi, I am trying to make a UART connection with a device from serial1 in MSP432. It isn't working as i cannot see anything printing on my serial monitor (I am trying to print the data stored in global variables using serial/USB). Wherein the same code works fine on MSP430 or TM4C1294 devices. I have double checked my wiring connections.. P3.2, P3.3 for RX, TX. Can anyone here help me resolve this issue or point out where im going wrong.. Please find the code below //----------------------------------------------------------------------------- // Microchip MCP39F501 Power Monitor TI Interface Sample Code #define ACK 0x06 #define NACK 0x15 #define CSFAIL 0x51 int OK1_Count = 0; // Success/No Success Counter for Reg Read 0x0002 int NOK1_Count = 0; byte Xmit_Dly = 2; // Transmit Delay between bytes, in msec byte Header; // Received ACK/NACK/CSFAIL byte byte Byte_Count; // Reveived Byte count byte CurrentRMS_LL; // 0x0004 CurrentRMS byte CurrentRMS_L; // 0x0005 CurrentRMS byte CurrentRMS_H; // 0x0006 CurrentRMS byte CurrentRMS_HH; // 0x0007 CurrentRMS byte VoltageRMS_L; // 0x0008 Voltage RMS byte VoltageRMS_H; // 0x0009 Voltage RMS byte ActivePower_LL; // 0x000A ActivePower byte ActivePower_L; // 0x000B ActivePower byte ActivePower_H; // 0x000C ActivePower byte ActivePower_HH; // 0x000D ActivePower byte ReactivePower_LL; // 0x000E ReactivePower byte ReactivePower_L; // 0x000F ReactivePower byte ReactivePower_H; // 0x0010 ReactivePower byte ReactivePower_HH; // 0x0011 ReactivePower byte ApparentPower_LL; // 0x0012 ApparentPower byte ApparentPower_L; // 0x0013 ApparentPower byte ApparentPower_H; // 0x0014 ApparentPower byte ApparentPower_HH; // 0x0015 ApparentPower byte PowerFactor_L; // 0x0016 PowerFactor byte PowerFactor_H; // 0x0017 PowerFactor byte Freq_L; // 0x0016 Frequency byte Freq_H; // 0x0017 Frequency byte CheckSum; byte CalculatedCS; float CurrentRMS; // Current RMS float VoltageRMS; // Voltage RMS float ActivePower; // Active Power float ReactivePower; // Reactive Power float ApparentPower; // Apparent Power float PowerFactor; // Power Factor float Freq; // Frequency void setup() { Serial.begin(9600); Serial.println("Entering Loop "); } void loop() { if (RegRead0x0004()) { OK1_Count++; } else { NOK1_Count++; } Serial.println("------------------------------------------"); Serial.print("MCP39F501 DEMO BOARD : "); Serial.println("------------------------------------------"); Serial.println("OUTPUTS"); Serial.print("RMS Current : "); Serial.print(CurrentRMS*0.0001,4); Serial.println(" A"); Serial.print("RMS Voltage : "); Serial.print(VoltageRMS*0.1,1); Serial.println(" V"); Serial.println("DATA COMMUNICATION"); Serial.print("1st frame counts: OK="); Serial.print(OK1_Count,DEC); Serial.print(", Not OK="); Serial.println(NOK1_Count,DEC); delay(1000); } bool RegRead0x0004(void) { Serial1.begin(4800); WriteByte(0xA5); WriteByte(0x08); WriteByte(0x41); WriteByte((byte)0x00); WriteByte(0x04); WriteByte(0x4E); WriteByte(0x16); WriteByteND(0x56); ClearBuffer(); // Parse the data returned from the meter if (Serial1.available()) { Header = Serial1.read(); Byte_Count = Serial1.read(); CurrentRMS_LL = Serial1.read(); CurrentRMS_L = Serial1.read(); CurrentRMS_H = Serial1.read(); CurrentRMS_HH = Serial1.read(); VoltageRMS_L = Serial1.read(); VoltageRMS_H = Serial1.read(); ActivePower_LL = Serial1.read(); ActivePower_L = Serial1.read(); ActivePower_H = Serial1.read(); ActivePower_HH = Serial1.read(); delay(50); ReactivePower_LL = Serial1.read(); ReactivePower_L = Serial1.read(); ReactivePower_H = Serial1.read(); ReactivePower_HH = Serial1.read(); ApparentPower_LL = Serial1.read(); ApparentPower_L = Serial1.read(); ApparentPower_H = Serial1.read(); ApparentPower_HH = Serial1.read(); PowerFactor_L = Serial1.read(); PowerFactor_H = Serial1.read(); Freq_L = Serial1.read(); Freq_H = Serial1.read(); CheckSum = Serial1.read(); } Serial1.end(); Serial.print("Cehcksum Received: "); Serial.println(CheckSum,HEX); // Calculate the expected CheckSum CalculatedCS = (byte)((int)( Header + Byte_Count + CurrentRMS_LL + CurrentRMS_L + CurrentRMS_H + CurrentRMS_HH + VoltageRMS_L + VoltageRMS_H + ActivePower_LL + ActivePower_L + ActivePower_H + ActivePower_HH + ReactivePower_LL + ReactivePower_L + ReactivePower_H + ReactivePower_HH + ApparentPower_LL + ApparentPower_L + ApparentPower_H + ApparentPower_HH + PowerFactor_L + PowerFactor_H + Freq_L + Freq_H + 0)%256); Serial.print("Checksum Calculated: "); Serial.println(CalculatedCS,HEX); // Check for ACK, correct byte count and CheckSum matches expected checksum if ((Header == 0x06) ){//&& (Byte_Count == 0xD) && (CheckSum == CalculatedCS)) { Serial.println("IM HERE"); CurrentRMS = ((unsigned long)(CurrentRMS_HH << 24) + (unsigned long)(CurrentRMS_H << 16) + (unsigned long)(CurrentRMS_L << 8) + (unsigned long)(CurrentRMS_LL)); VoltageRMS = ((unsigned int)(VoltageRMS_H << 8) + (unsigned int)(VoltageRMS_L)) ; return true; } else return false; } void WriteByte(byte _wbyte) { Serial1.flush(); Serial1.write(_wbyte); delay(Xmit_Dly); } void WriteByteND(byte _wbyte) { Serial1.flush(); Serial1.write(_wbyte); //delay(Xmit_Dly); } void ClearBuffer(void) { Serial1.flush(); while(Serial1.available()) char _f = Serial1.read(); delay(30); }
  18. Hi, I am using MSP432P401R to make a UART connection and talk to a board. I have found in the datasheet that MSP432 supports only one UART (RX-P3.2, TX-P3.3). In this case when I use serial to transmit and receive from the other board, Can there be a way i can view the data on serial monitor? How to realize this? I have read in other posts about software serial where GPIOs can be used as serial pins. Can someone brief it for me. My project basically is to read bytes from MCP39F501 onto MSP432P401R and then transmit that data using MODBUS TCP protocol with CC3100 boaster pack.
  19. Hi, I am new to CC3200. Actually I want to use the Uart of cc3200. My application is to read data from a serial transmitter of another device using CC3200 and print the data on the serial monitor of Energia. I saw that there are two kinds:- Serial and Serial1. Can I use serial1 to read the data and then print data on serial monitor of Energia using Serial. Do I need to shift the J6,J7 from flash mode to BP mode?? I have seen the pinmapping. In that I found that Serial 1 is connected on UART1_Rx on GPIO11 i.e. P1-10 of CC3200 launchpad. Do I need to connect the peripheral devices' Tx pin on P1-10 and then print the data on Serial monitor using Serial.write(); ??
  20. Hello, I want to make a wireless thermometer using two microcontrollers. How do I write the code in Energia to transmit and receive a variable using a 433 Mhz RF module? Transmitter Setup: I have a TM4C123G connected to a RF transmitter using TX(3) pin 34 on the MCU. The TM4C123G is also connected to a LM34DZ Temp sensor. I need help to modify this working code to send the temperature variable using tx(3) pin 34 /*TM4C123G*/ //initializes/defines the output pin of the LM34 temperature sensor int outputpin= A11; // (pin # 2), use A11 analog input //--------------------------------------------------------------------- //this sets the ground pin to LOW and the input voltage pin to high void setup() { Serial.begin(9600); Serial3.begin(9600); //---------------------------------------------------------------------- } void loop() { int rawvoltage= analogRead(outputpin); float millivolts= (rawvoltage/4095.0) * 3300; float fahrenheit= millivolts/10; Serial3.write(fahrenheit); //transmits temperature to receiver Serial.println(fahrenheit);//displays temperatur on Serial monitor delay(200); } Receiver Setup: I also have a MSP432 connected to a RF receiver using rx pin 3 on the MCU. The MSP432 is connected to a 16x2 LCD. I need help to modify this working code to receive the temperature variable using rx pin 3 and display to the lcd. /*Receiver MSP432*/ #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(); } //----------------------------------------------------------------- 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); }
  21. 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!
  22. Why on earth would TI engineers use random GPIO pins for the built-in UART BSL instead of RXD/TXD of one of the USCI peripherals?? I mean, in 90% of real world use cases, the likely source of a firmware update, i.e. computer, USB bridge, blue-tooth modem etc., will be hanging on one of the UARTs. Instead they picked 2 pins on the side of the package where all the I/Os are nicely lined up and which therefore most likely would be wired up to all the other stuff. Oh yes, and of course those two pins are exactly on the opposite side of the TEST / BSL enable pin. /rant
  23. To simplify debugging, I'm contemplating connecting two serial devices (gps - MT3339 and sat-comm - Iridium 9602 ) to the same RX/TX pins on the msp430f5529lp (port pins P3.3 and P3.4). They are never powered at the same time. This uses Serail1 for GPS fixes and Sat-Comm messages, and leaves Serial free for debug. Are there problems with doing this?
  24. I was reading the Family guide, as well as the F5529 guide and could not really determine how power consumption is affected by the UART in Asynch mode. I expect that baud will certainly play a role, as the core voltage must be increased to run at higher frequencies. The thought behind all of this is driven by wanting to keep battery life at a maximum, of course... My GPS/Iridium Satellite comm device is following this basic flow: loop() switch(currentState) case ENABLE_GPS: { Serial1.begin(9600); digitalWrite(GPS_SleepPin, HIGH); //enable the GPS currentState = WAIT_FOR_GPS_FIX; break; } case WAIT_FOR_GPS_FIX: { if(bGPS_sentences_valid) { currentState = DISABLE_GPS; } break; } case DISABLE_GPS: { Serial1.end(); digitalWrite(GPS_SleepPin, LOW); //disable the GPS currentState = SLEEP; break; } case SLEEP: { sleepSecond(3600); //wait an hour for next fix currentState = ENABLE_GPS break; } default: break; } Is there a power-saving benefit to stopping and starting the UART? I would assume so, but am aware that the UART code has a built-in sleep() as well. As an aside: I was seeing all kinds of weird behavior when trying to use the enable pin on the GPS, an MT3339. I finally tracked it down to the fact that when the P6_5 pin went LOW, the Enable pin on hte MT3339 drew 350uA... a 10K resistor has resolved that problem, but the ee noob that I am, it took me some time to find the problem. Whle the boards that arrived on Saturday don't have a resistor in the circuit, in the future I'll probably add both a mosfet for the pin to drive, AND a resistor to limit the loss of precious electrons...
  25. I tried to change the settings used by UART for Serial or Serial1 on an MSP432 (stopbits, parity etc.). After hours of detective work I now guess the settings are applied by some code of the wiring framework in the emt432 framework. There is much code, but almost nothing of it is used, as most of wiring and the TI runtime seems to be precompiled to binary libraries like the wiring_msp432.m4fg.lib file. There are no Makefiles, nor any references how those binaries are built as far as I can see. So how to fiddle with anything below the Energia provided API? Do I now need external IDEs / Compilers / whatever to change something? I am not used to that stuff from the Arduino framework :-p
×
×
  • Create New...