Jump to content

nickn

Members
  • Content Count

    81
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    nickn got a reaction from gsutton in The great question about the ESP8266 has been answered!   
    The CEO of Espressif has confirmed on Facebook that the I/O pins of the ESP8266 are 5V tolerant  . He also mentioned that the ESP32 and the ESP8285 I/O are also 5V tolerant.
     
     
    https://www.facebook.com/groups/1499045113679103/permalink/1731855033731442/?hc_location=ufi
  2. Like
    nickn got a reaction from bluehash in Code breaks when optimization is used (msp430-gcc)   
    Thanks for the answer and suggestion. I shall go see if that works.
    UPDATE: Your suggestion worked
  3. Like
    nickn got a reaction from tripwire in Code breaks when optimization is used (msp430-gcc)   
    Thanks for the answer and suggestion. I shall go see if that works.
    UPDATE: Your suggestion worked
  4. Like
    nickn reacted to chicken in Code breaks when optimization is used (msp430-gcc)   
    Your delay loop will be optimized away.
     
    Not sure if it's supported by the gcc tool chain, but in CCS I use __delay_cycles() for this purpose.
  5. Like
    nickn got a reaction from SteveR in Silicon Labs EFM8 microcontroller. Free if you poll.   
    @@SteveR After not receiving any emails for a week after the Webinar, I called Avnet and I eventually was transferred to somebody that knew what I was talking about and took my address.  I never got the email saying that a distributor would contact me for my address.  I do live in the US.
  6. Like
    nickn reacted to fatihinanc in Configuring the f5529lp to run at 25 MHz   
    @@nickn
     
    You just need to set PMM registers and change the core voltage step by step. The code which given below sets the core voltage to correct value and also generates 25 MHz from LFXT1(32.768kHz). It is referenced from TI code examples.(MSP430F55xx_UCS_10.c) Only difference is ACLK = LFXT1, not REFO.
    void set25mhz(void) { P5SEL |= BIT4 + BIT5; // Select XT1 // Increase Vcore setting to level3 to support fsystem=25MHz // NOTE: Change core voltage one level at a time.. SetVcoreUp (0x01); SetVcoreUp (0x02); SetVcoreUp (0x03); UCSCTL6 &= ~(XT1OFF); // XT1 On UCSCTL4 |= SELA_0; // ACLK = LFTX1 (by default) UCSCTL6 |= XCAP_3; // Internal load cap __bis_SR_register(SCG0); // Disable the FLL control loop UCSCTL0 = 0x0000; // Set lowest possible DCOx, MODx UCSCTL1 = DCORSEL_7; // Select DCO range 50MHz operation UCSCTL2 = FLLD_0 | 762; // Set DCO Multiplier for 25MHz // (N + 1) * FLLRef = Fdco // (762 + 1) * 32768 = 25MHz // Set FLL Div = fDCOCLK/2 __bic_SR_register(SCG0); // Enable the FLL control loop // Worst-case settling time for the DCO when the DCO range bits have been // changed is n x 32 x 32 x f_MCLK / f_FLL_reference. See UCS chapter in 5xx // UG for optimization. // 32 x 32 x 25 MHz / 32,768 Hz ~ 780k MCLK cycles for DCO to settle __delay_cycles(782000); // Loop until XT1,XT2 & DCO stabilizes - In this case only DCO has to stabilize do { UCSCTL7 &= ~(XT2OFFG | XT1LFOFFG | DCOFFG); // Clear XT2,XT1,DCO fault flags SFRIFG1 &= ~OFIFG; // Clear fault flags }while (SFRIFG1&OFIFG); // Test oscillator fault flag UCSCTL6 &= ~(XT1DRIVE_3); // Xtal is now stable, reduce drive strength } void SetVcoreUp (unsigned int level) { // Open PMM registers for write PMMCTL0_H = PMMPW_H; // Set SVS/SVM high side new level SVSMHCTL = SVSHE | SVSHRVL0 * level | SVMHE | SVSMHRRL0 * level; // Set SVM low side to new level SVSMLCTL = SVSLE | SVMLE | SVSMLRRL0 * level; // Wait till SVM is settled while ((PMMIFG & SVSMLDLYIFG) == 0); // Clear already set flags PMMIFG &= ~(SVMLVLRIFG | SVMLIFG); // Set VCore to new level PMMCTL0_L = PMMCOREV0 * level; // Wait till new level reached if ((PMMIFG & SVMLIFG)) while ((PMMIFG & SVMLVLRIFG) == 0); // Set SVS/SVM low side to new level SVSMLCTL = SVSLE | SVSLRVL0 * level | SVMLE | SVSMLRRL0 * level; // Lock PMM registers for write access PMMCTL0_H = 0x00; }
  7. Like
    nickn got a reaction from TechIO in Add more LEDs with Fading   
    Ok here is the one that I did in CCS (fairly new to using CCS myself):
    #include <msp430.h> void main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1DIR |= BIT6; P1SEL |= BIT6; P1OUT&=~BIT6; CCR0 = 1000-1; // PWM Period frequency is determined by //clk freq divided by CCR CCTL1 = OUTMOD_7; // CCR1 reset/set CCR1 = 0; // CCR1 PWM duty cycle TACTL = TASSEL_2 + MC_1;// SMCLK, up mode //SMCLK runns at main clock speed in this micro it's 16 Mhz while(1){ if(CCR1 == 0){ while(CCR1<500){ CCR1= CCR1+1; __delay_cycles(2000); } } else{ while( CCR1 > 0){ CCR1= CCR1-1; __delay_cycles(2000); } } } }
  8. Like
    nickn reacted to Rickta59 in question about using f5529 launchpad to program g2553   
    For testing try this ..
     
    Remove everything except the 3.3+, gnd, test, reset.
     
    Get rid of the cap, led, led resistor .. resistors to power and gnd
     
    run a wire from power rail gnd to gnd
    run a wire from power rail 3.3v to vcc
     
    See if you can program it. If so, add back in the led and resistor led.
×
×
  • Create New...