Jump to content

lethaixuong

Members
  • Content Count

    15
  • Joined

  • Last visited

About lethaixuong

  • Rank
    Member

Profile Information

  • Location
    VietNam
  1. Try this way: Computer transmits another byte named CRC. On MCU, it will generate a CRC to check whether it matches with CRC code from Computer. But I don't know where to find CRC function in energia. I need CRC 8 Function.
  2. So how to enable parity checking in ENERGIA? In the other word, I want to make CRC checking while TX and RX. Anyone has done this before?
  3. I dont want it to echo all income data back because I will send another data back. I want to know how the parity works in this situation.
  4. Hi, How can I check error when MCU receives wrong byte through using UART? I use Computer (C#) to transmit data to msp430g2553. Are there any solutions or example to check if RX and TX are not the same? Thanks a lot.
  5. Problem fixed in v13. In v12. mspflash.h mis include energia.h
  6. Someone please help. I can not use Energia to write or read FLASH.
  7. @@energia Thanks for your hard working. But I think energia-0101E0013 is having a small bug in Serial Communication In ASCII Table Example: when I upload code in version 0101E0013 the response of the msp430 is slower 3 seconds when I press reset button. The similar thing does not happen in older version 0101E0012. Whenever I press reset button It clears and give me a new response. MSP430G2553. Please fix this.
  8. Deleted... Everything is fine. This is my mistake.
  9. Thanks for quick reply. I've some useful stuff at arduino union u_tag { byte b[4]; float fval; } _x, _y; Use this union to convert. Awesome.
  10. I've changed my mind. I decided to process values on my computer than transmit float numbers to MSP430. But I have no idea how to transmit float to MSP430. It doesn't work. But if I transmit 2 bytes of integer it works fine. Someone please show me how to receive 4 bytes of float in MSP430. This is a piece of my code. For int int x = Serial.read(); x += Serial.read() << 8; int y = Serial.read(); y += Serial.read() << 8; Work fine For Float: byte _x[4], _y[4]; _x[0] = Serial.read(); _x[1] = Serial.read(); _x[2] = Serial.read(); _x[3] = Serial.read(); _y[0] = Serial.read(); _y[1] = Serial.read(); _y[2] = Serial.read(); _y[3] = Serial.read(); float x = buildUp(_x); float y = buildUp(_y); float buildUp(unsigned char outbox[]) { unsigned long d; d = (outbox[3] << 24) | (outbox[2] << 16) | (outbox[1] << 8) | (outbox[0]); float member = *(float *)&d; return member; } Not work I really need floating point so please help.
  11. Sorry for missing information I'm using msp430g2553. So your advice is giving my project up ;(
  12. It appears that strtol is declared in my scope but not strtod(). I've opened stdlib.h and only strtol is declared. How to add strtod as another complie supports it. Or please tell me any way to convert a string to a float or double
  13. Someone please tells me how to add this function. I've tried to but #include <stdlib.h> but no luck. thanks
  14. This is my result when I execute Flash Example on msp430g2553. Please tell me why I got this result (not hello world as expected).
×
×
  • Create New...