Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    pivden got a reaction from MMKC in Pin map MSP430G2553 28pin   
    1. wrong pin map. http://www.ti.com/lit/ds/symlink/msp430g2553.pdf  page 3 and Table 2.
    2. use http://forum.43oh.com/topic/3237-energia-library-nordic-nrf24l01-library/ with BUG FIX Energia (see in topic).
  2. Like
    pivden got a reaction from elpapais in [Energia Library] OneWire DS18B20 (430 & Stellaris)   
    check the hardware:
    Vcc to Vcc
    GND to GND
    DQ (DATA) to P2.1
    resistor (4.7K or 2-6K) from Vcc to P2.1
    P2.1 defined in code:

    #define OWPIN  9

    Figure 5. Powering the DS18B20 with an External Suppl

  3. Like
    pivden reacted to calinp in [Energia Library] Petit FatFS SD Card Library   
    A small update:
    - all config settings in one file - pffconf.h
    - a soft SPI driver ( shuftIn/shiftOut ) that can be enabled in pffconf.h. It defaults on HW SPI pins, but these can be changed using FatFs.begin(cs_pin, sclk_pin, mosi_pin, miso_pin); . The speed is very low, but it frees 3 pins that can be used as analog inputs or I2C.
    - added a small benchmarking example
    Tested on MSP430G2553 and Stellaris Launchpads. A minimal program should work also on MSP430G2452. 
    On fraunchpad the examples compile without errors but I don't have the board to test it.
  4. Like
    pivden got a reaction from OzGrant in [Energia Library] OneWire DS18B20 (430 & Stellaris)   
    question in the wrong time delay (ms, micros) after the command 0x44 (convert T command).
    in code delay in micro seconds, but must be in ms.
    even for 9-bit resolution delay must be 94ms.
    for resolution 12 bit, temperature data in the first 0.75 second will be invalid and will lag. 
    in the loop will work but will lag.
  5. Like
    pivden reacted to PowerX in IRremote   
    You need to modify IRremote.cpp under "\hardware\msp430\libraries\IRremote".
    After the TIMER_PIN_SELECT();
    Comment these lines :
    // pinMode(TIMER_PWM_PIN, OUTPUT);
    // digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
    The pin output is P2_3. For the demo you need to send something on serial to transmit.
    PS: Tested and working IRrecv and IRsend with 2xmsp430g2553.
    Hope it helps,
    Have fun
  6. Like
    pivden got a reaction from sirri in Real-Time Clock (RTC) Library for the MSP430/LaunchPad   
    grahamf72, nice work!
    about code size: #include <RTCplus.h> RealTimeClock myClock; void setup() {  myClock.begin(); } void loop() {} interrupt(TIMER1_A0_VECTOR) Tic_Tac(void) {  //myClock++;    //Binary sketch size: 867 bytes (with RTCSUBSECONDS), 585 bytes (w/o RTCSUBSECONDS)  //++myClock;    //Binary sketch size: 593 bytes (with RTCSUBSECONDS), 563 bytes (w/o RTCSUBSECONDS)  //myClock.Inc(); //Binary sketch size: 579 bytes (with RTCSUBSECONDS), 549 bytes (w/o RTCSUBSECONDS) };  
    I optimised the LiquidCrystal library that is included with Energia for 4bit mode (minimal optimization -214 bytes). 
    P.S. grahamf72, You can post LIb into Energia Libraries
  7. Like
    pivden reacted to OzGrant in OneWire Energia Library   
    Might even help if I added the zip.
  8. Like
    pivden reacted to grahamf72 in Real-Time Clock (RTC) Library for the MSP430/LaunchPad   
    I discovered I actually had the stray dot in my documentation - oops!! sorry.
    I haven't found as much difference in compilation size as you are getting. I am only finding 36 bytes difference between directly calling Clock.Inc_sec() and using Clock++ but given that every byte is precious, I have updated my library to create an inline function Inc() which calls Inc_sec() or Inc_chunk() depending on the tick size. I have left the ++ operators in so you can still use them if you wish - the compiler is smart enough that the ++ operators don't create any overhead if you don't use them.  
    Attached is the latest version of my RTCplus library, with the Inc function and corrected documentation. I have also removed the documentation from the .cpp file and put it all in the .h file, it makes it easier for me to not have to keep two sets of the same stuff synchronised.
    I am curious about this optimised LCD1602 4 bit library you mention. I have been using the LiquidCrystal library that is included with Energia. Where did you find this 4 bit optimised library?
  9. Like
    pivden got a reaction from grahamf72 in Real-Time Clock (RTC) Library for the MSP430/LaunchPad   
    interrupt(TIMER1_A0_VECTOR) Tic_Tac(void) {        myClock.++;      // Update chunks   };  error: expected unqualified-id before '++' token
        interrupt(TIMER1_A0_VECTOR) Tic_Tac(void) {        myClock++;      // Update chunks    }; work! I'm sorry, was inattentive.  ;-)
    finished size of my code with LCD1602 4bit optimized library (blank sketch will be less):
    - myClock++;                    2`587 byte
    - myClock.PlusPlus();       2`305 byte
  10. Like
    pivden reacted to grahamf72 in Real-Time Clock (RTC) Library for the MSP430/LaunchPad   
    Attached is my modified version of Yannick's RTC library.
    The main changes I have made are that it also does dates, and allows either 1 second or 1/256 second resolution.  To avoid code bloat for features you don't need, these features are controlled by editing the header file to comment out / uncomment some #defines. Hopefully a future release of Energia will allow specifying -D defines that get passed to the compiler, avoiding the need to edit the header file.
    The features that I have are:
    When RTCSUBSECONDS is defined, the library generates ticks every 1/256 of a second. This is the same timing that Yannick's library used. Useful if you need fractional second resolution.  If this is turned off, the library will tick once every second. 
    #define RTCWITHDATE
    Fairly self explanatory - this turns on date features in addition to the time.  Basic leap year detection is included, however it will get leap years wrong in century years, so in the unlikely event your project will still be around in 2100, this will not work correctly for you.  No effort is made to account for leap-seconds.
    Also changed from Yannick's code, the Inc_sec, Inc_min, Inc_hour etc functions have been made public. I use this to allow user adjusting of the values (press a button to increase the hour etc).
    For smallest code size, comment out the #define lines for RTCSUBSECONDS and RTCWITHDATE.  With RTCSUBSECONDS turned on, and RTCWITHDATE turned off, the code size is exactly the same as what I was getting with Yannick's library - reflecting the fact that the code is basically identical.  
    Full documentation of how to use the library is included in the header file. Please let me know if you find any bugs / problems etc or need any guidance in using the library.
  11. Like
    pivden reacted to energia in Error with Liquid Crystal library...   
    Just looked at the error and noticed that it has trouble finding a match for the write(0). It doesn't treat the argument as a uint8_t. When explicitly casting to a uint8_t, it works as expected. Might be an issue with the compiler and will have to narrow it down. For now your solution is:


  12. Like
    pivden reacted to boarboar in OneWire Energia Library   
    I hope attached library may help.
    i've used http://sourceforge.net/projects/msp430-ds18b20/ as a starting point.
  13. Like
    pivden reacted to bobnova in Simple one-button combination lock   
    I tried the library, it refused to write anything but strings. All my attempts at telling it to write anything else resulted in 210 being stored. Never did figure out why! It may well have been operator error. Probably was, really.
    The flash reading and writing stuff is pulled out of the library (mspflash.cpp, to be specific) and changed slightly to suit my purposes.
  • Create New...