This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C-Program for transmission of data.



I am using MSP430 microcontroller for my project.

I want C-program to transmit data collected from a wireless sensor.

I am using TWS-RWS 433 as my transmitter and receiver respectively.

I want the data from my wireless sensor to be sent only after reaching certain value else microcontroller should be in sleep mode.

As main aim of my project is to design a control system which consumes ultra low power to do the transmission process.

Thank you.

  • Gurudas Kadam said:
    my project.

    Well, if it is your project then, surely, you must be the one to write the software that it requires...?!

  • Hey Andy,

    My project means I am doing it at home just to see if I am able to do it.

    Its not the academic project or anything.

    I am Electrical Engg. so not good in programming stuff.

    So wanted help for coding it. So that it can help me doing rest other stuffs.

    Thank you.

  • Gurudas Kadam said:
    to see if I am able to do it

    Well, You won't find that out by just asking people to do it for you - will you?!

    Gurudas Kadam said:
    I am Electrical Engg. so not good in programming

    I'm afraid you won't get very far in Electrical Engineering these days without some basic programming skill...

    Gurudas Kadam said:
    wanted help for coding it.

    So what "help", exactly, do you need?

    What have you tried?

    Where are you stuck?

    • Do you have a basic understanding of programming in general?
    • Do you have at least a basic understanding of programming in 'C' specifically?
    • Do you have at least a basic understanding of electronics?
    • Do you have at least a basic understanding of microcontrollers in general - memory, CPU, registers, typical peripherals?

     

  • Andy,

    I am stuck up with which power mode to use.

    And accordingly how to configure the registers used in it.

    MSP architecture is quite different from PIC or so which I have used it earlier.

    I have launchpad with me.

    Even tried with basic LED program which is running successfully on it.

    Just I am not getting how to go with it for my project stuff.

    How to configure it for sleep mode when the transmission is not taking place.

    I have 2 stages in my project.

    Level monitoring and code transmitting.

    So whenever the data received fro sensor reaches threshold value it should send it via transmitter, but till then it should be in sleep mode so that it consumes low power.

    I am stuck up with it.

    Thank you.

  • I'm not familiar with that radio, but in general a wireless sensor node is fairly complex for a "beginner" project.

    I suggest you start with the manufacturer, to see if you can find some sample code. The code might not be for an MSP430, but it should give you a hint what steps are important to get the radio running.

  • You titled this thread, "C Program for transmission of data" - but the points you've just raised have nothing to do with that!

    So, if someone had given you a C Program for transmission of data - as you initially requested - it would not have helped you at all!

    TI specifically markets the MSP430 as an "Ultra-Low Power" MCU. In support of that, they provide a great deal of material - documentation, examples, tutorials, wikis, videos, etc, etc,...

    You are going to have to spend a good amount of time studying that material to gain the necessary familiarity.

    As already noted, this is not beginners material:

    • Designing radio networks is not trivial;
    • Designing very-low power systems is not trivial;
    • etc, etc,...

     

  • Gurudas Kadam said:
    I am stuck up with which power mode to use.

    Well, teh Low Power Modes of the MSP are no "I want to waste that much power" choice. if it were, you could always use the lowest and there were no reason for the other modes. Not it is a "I need that much of the CPU active" choice.

    Yes, MSP is quite dfiferent from PIC. For me, the PIC looked like a programmable state machine that pretends to be programmable by C code. :)

    I suggest the following procedure:

    1) list the requirements of your project
    2) study the users guides. Each MSP family has its own guide, but many things are the same for all families, most of the rest is at least similar. For a start, the overwiew parts for the modules will be sufficient for exactly that: an overview.
    3) pick an MSP that has what you need (ports, timers, quartz support, serial ports etc.), and maybe a bit more (or leave the option open of upgrading to an MSP of the same family with more features, possibly a pin compatible one)
    4) now take a deeper look into the users guide for this MSPs family. The module chapters explain how the modules work, what registers they have and what the registers do.
    5) Take a look at demo code. While there is usually only some simple code for each module, and usually nothing that can be used as-is, it is a starting point. Try to understand what the code does. In detail. Do not just copy it.
    6) start coding your own application.

    And yes, wireless communication is a rather advanced job. However, if the transceiver has its own MCU, it often comes down to some rather simple serial communication.

**Attention** This is a public forum