Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    jeruzalem reacted to spirilis in nRF24 Temperature Sensor Bug   
    Sure... the objective is to keep the pins from changing state at random and causing inappropriate excess schmitt-trigger current consumption. You can do this 2 ways: drive the pin with PxDIR bit set to 1, or keep it in input mode but activate a pullup/pulldown resistor. I used the latter strategy here because I think it's gentler; less current will flow if that pin accidentally gets shorted to GND or Vcc. It satisfies the goal and makes the device slightly more robust IMO. 
    If the pin gets externally shorted with PxDIR set high, the MSP430 may sink or source a lot of current through the short.
    Also to clarify- P1.2-1.7 are reconfigured by the msprf24 library.
    Sent from my Galaxy Note II with Tapatalk 4
  2. Like
    jeruzalem got a reaction from spirilis in nRF24 Temperature Sensor Bug   
    Thank you for explaination, now I know more
  3. Like
    jeruzalem reacted to oPossum in simple stepper control   
    #pragma vector = TIMER0_A0_VECTOR
    __interrupt void Timer0_A0 (void)              // Timer0 A0 interrupt service routine
        static const uint8_t steps[8] = {
    #if 0   // Full step
            BIT0 | BIT1,
            BIT0 | BIT1,
                   BIT1 | BIT2,
                   BIT1 | BIT2,
                          BIT2 | BIT4,
                          BIT2 | BIT4                               
            BIT0 |               BIT4,
            BIT0 |               BIT4
    #else   // Half step
            BIT0 | BIT1,
                   BIT1 | BIT2,
                          BIT2 | BIT4,
            BIT0 |               BIT4,
        static unsigned step = 0;
        P1OUT = (P1OUT & ~(BIT0 | BIT1 | BIT2 | BIT4)) | steps[7 & step++];

  • Create New...