Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by olivluca

  1. @@zeke, mark community read works, but it marks as read every section (oops), the one that doesn't work is the mark this forum as read in each subforum.

    @@bluehash, tried that and still have the problem. I also tried logging out and logging in again using the email instead of the username. It didn't work either (I didn't expect it to since I started seeing the problem before the merge).

    Doesn't the error code [#20312.1] help pinpoint the problem?


    Edit: I also tried with chrome (I normally use firefox) but I have the same problem (I tried with javascript disabled since javascript hides the problem, it apparently works but it really doesn't).

  2. With javascript disabled it gives me a  "Sorry, you don't have permission for that!" message, while with javascript enabled it appears to work (the topics show as read) but it really doesn't (reloading the forum they show as unread).

    It worked 2 days ago.


    Edit: the above error message has this error code attached: [#20312.1]

  3. any luck with the IRsend demo.. doesn't work for me.

    to which pin should i connect the output?

    the receive demo works fine. 


    i'm using the msp430g2553.


    The last time I tried IRsend with an msp430 I found that the timing was off by more than 10% and sometimes the led would remain on.

    See here:


    I don't know if either problem has been fixed in the meantime

  4. @@StefanWxx, I see that you had to reduce the mark/space timing by 10-15% wrt the timings in the arduino posts. This is consistent to what I had to do to get the NEC protocol working. I also have a (probably not 100% correct) solution for the led remaining on.

    See http://forum.43oh.com/topic/5396-irremote-library-sometimes-leaves-led-on/ for details.


    Edit: BTW, from the look of it, I'd say that samsung too is using the NEC protocol, so probably there is no need to add a separate sendSamsung function.

  5. BINGO, I reduced the delays by 10% and now I can control my tv. It means that the timings are off by 10%. Why? Bad calibration data in my msp?

    The commented out values are the correct ones (according to the NEC specifications).

    Note that 10% was just a guess, since I don't have a scope to check the real timing.


    Edit: in case it's relevant, I'm still using energia 0101E0011, I'll try later with the latest version.

    Edit2: tried with 0101E0012, it's the same.

    #define NEC_HDR_MARK    8100 //9000
    #define NEC_HDR_SPACE   4050 //4500
    #define NEC_BIT_MARK    504 //560
    #define NEC_ONE_SPACE   1521 //1690
    #define NEC_ZERO_SPACE  504 //560
  6. I modified the library with the attached patch, now the led doesn't stay on anymore but I cannot control my TV set (lirc, which probably is more tolerant with the timing, recognizes the codes).


    Edit: I'm not permitted to attach this kind of file, inlined here

    --- IRremoteInt.h.orig  2014-04-21 10:29:43.489878975 +0200
    +++ IRremoteInt.h       2014-04-21 11:33:19.417113888 +0200
    @@ -142,15 +142,16 @@
     // P2SEL |= BIT3; // P2.3 option select
     #define TIMER_PIN_SELECT() ({ \
       P2DIR |= BIT3;              \
    -  P2SEL |= BIT3;              \
    +  P2SEL &= ~BIT3;              \
    +  P2OUT &= ~BIT3;              \
     // defines for Timer_A (16 bits)
     // NOTE: Using A1 instead of A0 because A0 is used by Serial
     #if defined(IR_USE_TIMERA)
     #define TIMER_RESET
    -#define TIMER_ENABLE_PWM     (TA1CTL = TASSEL_2 + MC_1) // SMCLK, Up mode
    -#define TIMER_DISABLE_PWM    (TA1CTL = TASSEL_2 + MC_0) // SMCLK, Stop mode
    +#define TIMER_ENABLE_PWM     ({TA1CTL = TASSEL_2 + MC_1; P2SEL |= BIT3;}) // SMCLK, Up mode
    +#define TIMER_DISABLE_PWM    ({TA1CTL = TASSEL_2 + MC_0; P2SEL &= ~BIT3; P2OUT &= ~BIT3;}) // SMCLK, Stop mode
     #define TIMER_ENABLE_INTR    ({ /*TA1CTL |= TAIE;*/ TA1CCTL0 |= CCIE;}) // SH 071112 
     #define TIMER_DISABLE_INTR   ({TA1CTL &= ~TAIE; TA1CCTL0 &= ~CCIE;})
     #define TIMER_INTR_NAME      TIMER1_A0_VECTOR
    --- IRremote.cpp.orig   2014-04-21 11:36:07.333117889 +0200
    +++ IRremote.cpp        2014-04-21 11:29:03.862107798 +0200
    @@ -215,8 +215,8 @@
       TIMER_PIN_SELECT(); // P2.3 output and P2.3 option select (when TIMER_PWM_PIN is P2_3)
    -  pinMode(TIMER_PWM_PIN, OUTPUT);
    -  digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
    +  //pinMode(TIMER_PWM_PIN, OUTPUT);
    +  //digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
       // TODO: update the comments below
  7. As reported in this topic (sending samsung tv raw ir codes) sometimes the led stays on after transmitting.

    I see that the library defines these macros:

    #define TIMER_ENABLE_PWM     (TA1CTL = TASSEL_2 + MC_1) // SMCLK, Up mode  
    #define TIMER_DISABLE_PWM    (TA1CTL = TASSEL_2 + MC_0) // SMCLK, Stop mode
    #define TIMER_ENABLE_INTR    ({ /*TA1CTL |= TAIE;*/ TA1CCTL0 |= CCIE;}) // SH 071112 
    #define TIMER_DISABLE_INTR   ({TA1CTL &= ~TAIE; TA1CCTL0 &= ~CCIE;})
    #define TIMER_CONFIG_KHZ(val) ({ \
          TA1CCTL0 |= OUTMOD_4;      \
          TA1CCR0 = FOSC/val/2;      \

    and to send a space it uses TIMER_DISABLE_PWM.

    Now, I don't know exactly how the timers in a msp430 work, but OUTMOD_4 is Toggle and MC_0 stops the timer.

    Is it possible that if it is stopped when the led is on it will stay on?


  8. Did you solder the crystal to the launchpad? I wonder if my problem is the clock (since I'm still not succeeding in controlling my TV, and now I'm pretty sure the codes I'm using are right).


    Edit: my tv is an LG, it uses NEC codes (so I'm using sendNEC) and I think the timing is slightly off: while the tv doesn't react, a lirc receiver recognizes the codes (though with some difficulty). I don't know if what's off is the mark/space timing or the 38KHz carrier.

  9. Could it work with the msp430 (for DC motor control only)?

    The schematic is here.


    The 74HC595 should have no problem working at 3.3V, however the L293D specifies a minimum of 4.5V (though it should also work at 3.3V....if you're lucky).

    The software shouldn't be a problem.

  10. Being a bit of a noob when it comes to the analog world, I am confused what the purpose of D1 is in there.

    Why would that be added to the circuit?

    edit: nm, didn't see the link at the top of the post, that explains it :)

    If you aren't interested in overvoltage protection you can simply omit it (as I did in my simulation).


    I think this also means that current through Q1 will actually be greater than the current through Q2.


    Not really, with 500mA through Q2 I see only 5mA on Q1. The only catch is, as noted by oPossum, if the high level voltage is 0, all those 5mA will come from the microcontroller, with 14V the microcontroller has only to source 10uA.
  11. Thank you!

    The supply is coming from a car cigarette lighter socket (nominal 12V but I considered 14). I calculated the load at 500mA (though it will not exceed 200mA), and I used 500Ohm (the minimum HFe of a bc327 at 300mA is 40).

    I didn't consider the case with the 14V supply missing but LTSpice gives me a current of 5mA from the output, so it should be safe I think.

  12. Hello, googling for high side switching, I found this circuit.



    The canonical circuit is a little more complex, however I simulated the simpler circuit in LTSpice (substituting the transistor pair with a bc337/bc327, using a 500 Ohm resistor and omitting the zener), and it seems to fit the bill (for a 500mA output current, power dissipation in the transistors is well below the limit, current on the microcontroller pin is in the uA range).

    What's the catch?

  13. AFAIK, PL2303HXD is best USB-UART bridge chip, that support any baud rate till 2 Mbps, and can go till 12 Mbps. Unfortunately, Profilic made completely wrong approach to (Windows) driver support, and chip is locked to few standard baud rates.


    And the Linux driver did the same mistake, but I think it's because this commit came after this one



    I was needed some other baud rates (under Win XP), so I made my own driver update application.



    Interesting, my search for "pl2303 custom baud rate" didn't find it. Is it available somewhere? What does it exactly do? (just to know if it'd be safe to remove the check for a supported baud rate in the Linux driver).

  • Create New...