Jump to content

Jonoveve

Members
  • Content Count

    5
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Jonoveve got a reaction from dubnet in [Energia Library] Hardware Counter Library for MSP430   
    Hello.
    I have a quartz oscillator with fo=1.6 MHz and I have changed it features and now it band width is around 20 kHz. For this, i need to a good precision.
    I am using the board msp430fr6989.
     
    My code is the next:
    #include <CounterLib_t.h> Counter<CL_TimerB0> MyCounter; //pin P2.0 void setup() { MyCounter.start(CL_Div2); // 2 pulses Serial.begin(9600); } void loop() { MyCounter.reset(); delay(1000); Serial.print((MyCounter.read()+32767.5*23)*2+32800); //32765.5 = 65535/2 **CL_Div2** //(MyCounter.read()+...)*2 **CL_Div2** //32800 manual calibrate Serial.println(" Hz"); Serial.println(cont); delay(1000); } With this code i get:
    - From frequency generator: F=1.58 MHz     -> Measure with the board: F=1579589 Hz     -> Error: 0.026%
    - From frequency generator: F=1.6 MHz       -> Measure with the board: F=1600093 Hz     -> Error: 0.0058%
    - From frequency generator: F=1.62 MHz     -> Measure with the board: F=1620377 Hz     -> Error: 0.023%
     
    The total BW is 127000 Hz
    - From 1,542 MHz with error=0.077% to 1,669 MHz with error=0,074
     
    For my proyect is a good precision.
     
    I put images like a sample.

     

  2. Like
    Jonoveve got a reaction from chicken in [Energia Library] Hardware Counter Library for MSP430   
    Hello.
    I have a quartz oscillator with fo=1.6 MHz and I have changed it features and now it band width is around 20 kHz. For this, i need to a good precision.
    I am using the board msp430fr6989.
     
    My code is the next:
    #include <CounterLib_t.h> Counter<CL_TimerB0> MyCounter; //pin P2.0 void setup() { MyCounter.start(CL_Div2); // 2 pulses Serial.begin(9600); } void loop() { MyCounter.reset(); delay(1000); Serial.print((MyCounter.read()+32767.5*23)*2+32800); //32765.5 = 65535/2 **CL_Div2** //(MyCounter.read()+...)*2 **CL_Div2** //32800 manual calibrate Serial.println(" Hz"); Serial.println(cont); delay(1000); } With this code i get:
    - From frequency generator: F=1.58 MHz     -> Measure with the board: F=1579589 Hz     -> Error: 0.026%
    - From frequency generator: F=1.6 MHz       -> Measure with the board: F=1600093 Hz     -> Error: 0.0058%
    - From frequency generator: F=1.62 MHz     -> Measure with the board: F=1620377 Hz     -> Error: 0.023%
     
    The total BW is 127000 Hz
    - From 1,542 MHz with error=0.077% to 1,669 MHz with error=0,074
     
    For my proyect is a good precision.
     
    I put images like a sample.

     

  3. Like
    Jonoveve got a reaction from Fmilburn in [Energia Library] Hardware Counter Library for MSP430   
    Hello.
    I have a quartz oscillator with fo=1.6 MHz and I have changed it features and now it band width is around 20 kHz. For this, i need to a good precision.
    I am using the board msp430fr6989.
     
    My code is the next:
    #include <CounterLib_t.h> Counter<CL_TimerB0> MyCounter; //pin P2.0 void setup() { MyCounter.start(CL_Div2); // 2 pulses Serial.begin(9600); } void loop() { MyCounter.reset(); delay(1000); Serial.print((MyCounter.read()+32767.5*23)*2+32800); //32765.5 = 65535/2 **CL_Div2** //(MyCounter.read()+...)*2 **CL_Div2** //32800 manual calibrate Serial.println(" Hz"); Serial.println(cont); delay(1000); } With this code i get:
    - From frequency generator: F=1.58 MHz     -> Measure with the board: F=1579589 Hz     -> Error: 0.026%
    - From frequency generator: F=1.6 MHz       -> Measure with the board: F=1600093 Hz     -> Error: 0.0058%
    - From frequency generator: F=1.62 MHz     -> Measure with the board: F=1620377 Hz     -> Error: 0.023%
     
    The total BW is 127000 Hz
    - From 1,542 MHz with error=0.077% to 1,669 MHz with error=0,074
     
    For my proyect is a good precision.
     
    I put images like a sample.

     

  4. Like
    Jonoveve got a reaction from energia in Change resolution PWM with msp430FR6989   
    Thanks you very much. it was what i want.
×
×
  • Create New...