Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by xv4y

  1. Hi I am buying monodirectional 433 MHz RX + TX pairs at cheap price in Hong Kong. Real usable bandwidth is around 2kbps, enough for a sensor. 2,4 GHz bidirectional pairs of modules are a little bit more expensive and offer up to 2Mbps bandwidth but I have not tested them already... A+, Yan.
  2. Hi! I am proud to share with you the result of my work during this afternoon. This code is some kind of beta as I have not tested everything. I have done a successful communication between a MSP430G2452 driving a cheap 433 Mhz transmitter to a Arduino Nano listening the receiver. I have not tested the client/server examples but I will try it soon with some 2,4GHz modules I have. The code compiles on both MSP430G2452 and MSP430G2553 but the latter has not been tested. Apart from understanding what was done by the code, my work has been to change the timer and interrupts codes from A
  3. Well that's impressive. As pressure sensors are expensive I will not offer them at first. It is not fixed yet but what I think is to have : - one wireless sensor using DHT22 + MSP430G2452 + 433MHz TX - one "weather station" with one local DHT22 + 433MHz RX + LCD + Ethernet. The controller should be an Arduino nano because it has 1ko EEPROM to do some statistics and 1ko of SRAM enough to run a small web server for accessing the measurements. I'd like to keep things rather cheap so many people can start to play with it learning how to program micro-controllers. Code will be open to owners a
  4. Hi, Work great with DHT11 and DHT22 both on the MSP430G2553 and MSP430G2452. I am planning to build some kind of weather stations remote sensors using cheap On-Off Keying 433 MHz modules. I will try to port VirtualWire library but perhaps starting from scratch will be easier for what I need. I will publish my work as soon as it is "usable". Yan.
  5. Hi, I have tested to put everything in the begin() and it works. I will publish the corrected library tomorrow. Thanks! Yan.
  6. Hi Grahamf72, Thanks for searching around this problem. I have tried to place the lines in both begin() and the constructor but without success. Tomorrow I will try to put everything in the begin() as you have done. If it works ok I will publish it as 1.04. You can send me your full name in PM if you want acknowledgements. I have tried to do some clean up in the comments but perhaps they are not accurate. I try to maintain two versions of the library, one with one second accuracy for low CPU overhead and ok for most applications, one with better accuracy for my own needs. Sometim
  7. Hi, Happy new year! I don't know on current Energia release but at least in 006 and I think in 008 TimerSerial was working perfectly with the 2553. In fact, for some reasons it was even working better than hardware serial for me, but the CPU overhead was important of course. Yan.
  8. Hi, Well, yes. The method is called settime and takes 3 parameters : hours, minutes and seconds... The library by itself does not communicate with anything, but using Serial you could ask for 3 values and then set them as time... Yan.
  9. That's true, and each architecture has its pros and cons (ok, so nobody's hurt). However, having more RAM give a little bit more flexibility in programming, and for people like me that are new to embedded computing, is more suited to high-level languages. Code legibility and reusability comes at a cost : memory usage...
  10. Hi Guys, Thanks for the comments. Yes roadrunner I think you are right about the compiler behavior, all constants seem to be left in Flash. Your description of the MSP430 memory space is very true. Even more, at 16MHz the cost for accessing data in Flash instead of SRAM is not important and they share the same bus. Thankfully, all of this internal cuisine is hidden to us when programming with Energia. Thanks to the developers of GCC and Energia! Yan.
  11. As Rei Vilo already covered the mass memory aspect with good tips about reducing the Flash size of your binaries for the MSP430, I will share with you my conclusions about how to do the same but with SRAM usage. Just to make things clear, in Flash, all the "static" things are written, not to be modified runtime (except when using the MSPFlash library, but that's another story). It is there you store your program code, your constants... In SRAM, you will find the variables you declare yourself and use in your program and also a few things that are hidden to most of us. This things are stor
  12. xv4y

    ADC Resolution

    Hi simpleavr, Thanks for the tip about the MSP430F2013. It has some nice features but other specs are a bit disappointing : MSP430F2013: 2KB + 256B Flash Memory, 128B RAM This is a very small amount of RAM and Flash, perhaps better suited to programming with assembler... Yan.
  13. Hi Robert, Merry christmas to you. Sorry if I did not answer before but I was busy on other things including christmas and the kids... Thanks for investigating this. I will try to do other tests on my side. Regards, Yan.
  14. Hi Sirri, Your workaround should work but the problem is not here. The problem is that by default, Energia is sourcing the ACLK from the VLO 12 KHz instead of the 32KHz crystal. This make the RTC around 2-3 times slower. We should be able to change this by settings in the sRTC lib code but unfortunately it does not work as expected. Rob is currently working on this issue : http://forum.43oh.com/topic/2993-new-energia-release-0101e0009-12062012/page-2 For now, the right solution is to go inside Energia files to edit the hardware/msp430/cores/msp430/wiring.c file and comment out the
  15. Hi, I must be missing something... If I put BCSCTL3 = (LFXT1S_0 | XCAP_3); in the constructor, it seem to do nothing, ACLK is running at 12KHz. If I put it in my begin() (called in setup()), then the clock does not start at all... What is strange is that commenting out the BCSCTL3 line wiring.c does the trick... Yan.
  16. I must have tried but will do again. Now time to pick up my son from school and out for dinner along the river in the city (Can Tho, Mekong delta, now 31
  17. Well now it works and it works great! I had several parts of code put in different functions for clarity. I put everything into on big function to avoid variable passing and it saved me a lot of SRAM... Rei Vilo, your study about Flash footprint made me think of the cost of writing "clean procedural or object code" instead of raw lines... I have always been told that modern compilers have great optimizations but that's only true to a certain extent. Thanks for the brainstorming guys!
  18. Hi, I read your "Memory footprint..." article. Interesting and tradeoffs between code compactness and legibility has always been a problem. As someone stated, Assembler is the best for compactness but I am unable to speak good assembler even after more than 20 years trying to do it. However, my problem is not related with Flash because my code is around 6-8KB depending on what I activate. It is related to SRAM. I think I am having a stack overflow when I try to pass some strings to the 5110 sub-routines... I have to big arrays of 164 bytes each. One is only temporary but I don't kn
  19. I will work on it later today. I have also several way of saving a few octets I have to explore... Yan.
  20. Hi Robert, It does work. Thanks! However I have still no chance when I try to do the same to override the BCSCTL3 |= LFXT1S_2 that is set in wiring.c. I must be missing something with the bits logic. I have tried to put BCSCTL3 &= ~LFXT1S_2 in the constructor or later in the begin(). Placed in the constructor, the clock stays at 12KHz, placed later it just does not start... Tried to set everything in BCSCTL3 to 0 too without success... Yan.
  21. Hi Rick, Thanks for the input. I will have a look at it. Do you know a way to change this settings without having to modify Energia files. It's for me, but for the people to who I want to distribute the code... In Linux/OS X it's rather easy to do a patch. Not so on Windows... Now it's time to pickup my sons from school. I am also scratching my head because I am running out of SRAM. Each time I am trying to ouput one single more character to the 5110 LCD, the code crash... Yan.
  22. Robert, Rick told me about pins P2_6 P2_7 being set to GPIO instead of xtal by default. I will try this... Thanks, Yan.
  23. Hi, I have updated the library to be a little bit cleaner : http://xv4y.radioclub.asia/2012/12/19/bibliotheque-rtc-pour-energia-version-1-02/ Here's the downloads page : http://xv4y.radioclub.asia/boutique/docs/ And, well, guys, I am sorry but I don't think I will put much more work on it. It works for my purpose, so... I have a DS1307 in my hands but will hook it to an Arduino for a "weather station" project I have. The Arduino having the EEPROM embedded is more suited for this project as it allows to save measurements and compute statistics... Yan.
  24. Huh, well I have it corrected now. It was an error in my code. Anyhow, Energia 008 and 009 were having different behaviors and clearly some things were not taken in account the constructor in the 008 version and are now this could break some code when compiling with 009. Yan.
  25. Hi, I am going into the same kind of problem. In my RTC lib I was doing low-level settings in the constructor. As suggested I cleaned this a little and moved the low level clock/timer settings into a begin() routine to be called during setup(){}. Doing this, I found that some of the settings in the constructor were not taken in account by the compiler anyway (disabling the WatchDog by example was not a good idea...). Then it seems that during the setup other settings are not taken in account and my code is running really sloooowwww (at a 32KHz clock could be). Energia008 and Energia009
  • Create New...