Jump to content

nobody

Members
  • Content Count

    94
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    nobody got a reaction from kenemon in Rotary Encoder and the LP   
    My version (based on msp430f2274 but portable to other series...)
    Advace:
    - It is controlled by rising and falling edge of signal.
    - Simplified by using the lookup table (look here).
     
    (it's only test code - not optimized yet...)
     
    I know - it is not necessary to test switch thru interrupts - but this is preparation to another extensions (measure time of pushing, recognize long and short click, ...)
     

    #include "io430.h" #include "font5x7.h" #include "stdio.h" #include "intrinsics.h" #include "putchar.c" #define ENC_A BIT6 // P2.6 encoder A #define ENC_B BIT7 // P2.7 encoder B #define ENC_SHIFT 6 // Encoder testing with (P2IN >> 6) #define ENC_SW BIT5 // P2.5 encoder switch volatile int Encoder_Value = 0; // Encoder value volatile unsigned char Encoder_SW = 0; // Encoder switch value push = 1, free = 0; int main( void ) { // int n, i; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz DCOCTL = CALDCO_8MHZ; // (don't matter for this demo) // **Initialize system for encoder** P2SEL &= ~(ENC_A + ENC_B + ENC_SW); // Set back (XOUT/XIN) and Rosc to port function P2DIR &= ~(ENC_A + ENC_B + ENC_SW); // Input function P2REN |= ENC_A + ENC_B + ENC_SW; // Enable resistor P2OUT |= ENC_A + ENC_B + ENC_SW; // Pullup resistor P2IES |= ENC_A + ENC_B + ENC_SW; // Interrupt when 1 -> 0 (dynamically changed!!!!) P2IE |= ENC_A + ENC_B + ENC_SW; // Interrupt enable __enable_interrupt(); while(1) { if(Encoder_SW) Encoder_Value = 0; printf("Encoder=%d, \f", Encoder_Value); // I implemented my version of "putchar.c", // so I can use printf to an LCD display } } #pragma vector = PORT2_VECTOR __interrupt void Port2_Interrupt(void) { const signed char table[] = {0,-1,1,0,1,0,0,-1,-1,0,0,1,0,1,-1,0}; static unsigned char ab = 0; // the old value of the sensor ports // **switch test** if(P2IFG & ENC_SW) { P2IFG &= ~ENC_SW; if(P2IN & ENC_SW) // switch released { Encoder_SW = 0; P2IES |= ENC_SW; // Interrupt when 1 -> 0 } else // switch pushed { Encoder_SW = 1; P2IES &= ~ENC_SW; // Interrupt when 0 -> 1 } } // **encoder test** if(P2IFG & (ENC_A + ENC_) { P2IFG &= ~(ENC_A + ENC_; ab = ab << 2; // move the old data left two places ab |= ((P2IN >> ENC_SHIFT) & 0x03); // OR in the two new bits Encoder_Value += table[(ab & 0x0F)]; // get the change from the 16 entry table if(Encoder_Value > 32760) // Overflow? Encoder_Value = 32760; if(Encoder_Value < -32760) // Underflow? Encoder_Value = -32760; if(P2IN & ENC_A) // 1 P2IES |= ENC_A; // Interrupt when 1 -> 0 else // 0 P2IES &= ~ENC_A; // Interrupt when 0 -> 1 if(P2IN & ENC_ // 1 P2IES |= ENC_B; // Interrupt when 1 -> 0 else // 0 P2IES &= ~ENC_B; // Interrupt when 0 -> 1 } }
  2. Like
    nobody got a reaction from jsolarski in MSP430 Frequency Counter   
    One error is in line:
    TA1CTL |= TASSEL_1 + TAIE;
    Your timer not running. Edited line:
    TA1CTL |= TASSEL_1 + TAIE + MC_2; /* Timer A mode control: 2 - Continous up */
    And into interrupt routine maybe try this (you can see all captures, not only the first ...):
    P1OUT ^= BIT0; // Toggle Red LED using exclusive-OR
  3. Like
    nobody got a reaction from gwdeveloper in Best solution for ADC low external Vref?   
    The best (lowest number of parts) solution is to replace the Vref source.
     
    Seriously: Any additional adjustment of output voltage will cause degradation the parameters of the reference source. Buy 1.4V Vref chip.
  4. Like
    nobody got a reaction from djlorenz in is possible to control a pump with PWM @ 220V (AC)?   
    Use Optotriacs is the best alternative. And you need a circuit which detects the line voltage zero crossing. It is necessary for compute the timing for switching Optotriacs.
     
    Define precisely what type of pump you want to regulate. If the vibrating type, so it can be regulated by skip periods of 50Hz (you must skip positive and negative half-wave at the same time!)
     
    Some kinds of pumps can be controlled by changing the switching time of thyristors (like dimmers to control home lighting). If you have a thyristor dimmer at home - try to test it with your pump...
     
    Look at this page.
    And off course look here.
  5. Like
    nobody got a reaction from bluehash in is possible to control a pump with PWM @ 220V (AC)?   
    Use Optotriacs is the best alternative. And you need a circuit which detects the line voltage zero crossing. It is necessary for compute the timing for switching Optotriacs.
     
    Define precisely what type of pump you want to regulate. If the vibrating type, so it can be regulated by skip periods of 50Hz (you must skip positive and negative half-wave at the same time!)
     
    Some kinds of pumps can be controlled by changing the switching time of thyristors (like dimmers to control home lighting). If you have a thyristor dimmer at home - try to test it with your pump...
     
    Look at this page.
    And off course look here.
  6. Like
    nobody got a reaction from djlorenz in Dmx512 comunication with MSP430 and launchpad   
    All what you need is ELEKTOR Nr.3/2010 - page 34-39. I suggest you use MSP430F2232. Or use MSP430G2303 (has enough FLASH size for simple DMX receiver) or anything bigger - 2313, 2403, 2413, 2513 or 2553.
    For SW go to this webpage.
     
    To generate the DMX signal, use something like that and some simple (or complex) DMX software.
  7. Like
    nobody got a reaction from RobG in Dmx512 comunication with MSP430 and launchpad   
    All what you need is ELEKTOR Nr.3/2010 - page 34-39. I suggest you use MSP430F2232. Or use MSP430G2303 (has enough FLASH size for simple DMX receiver) or anything bigger - 2313, 2403, 2413, 2513 or 2553.
    For SW go to this webpage.
     
    To generate the DMX signal, use something like that and some simple (or complex) DMX software.
  8. Like
    nobody got a reaction from gordon in Factory DCO calibration, how accurate?   
    It's simple: You are use MC_2 (count to 0xFFFF) = 0.065536 sec
    0.065536 * 600 = 39.3216 sec
     
    Use MC_1 and everything will be O.K.
     
    BTW: TI defines cca 3% accuracy of calibration...
  9. Like
    nobody got a reaction from RobG in Factory DCO calibration, how accurate?   
    It's simple: You are use MC_2 (count to 0xFFFF) = 0.065536 sec
    0.065536 * 600 = 39.3216 sec
     
    Use MC_1 and everything will be O.K.
     
    BTW: TI defines cca 3% accuracy of calibration...
  10. Like
    nobody got a reaction from demonGeek in MSP430 servo control   
    Controll input is not inductive. In the servo is its own controller (or simple PID regulator) and power bridge to motor control.
  11. Like
    nobody got a reaction from gordon in Critical sections - how?   
    Disable interrupts is the only safe way to do it.
     
    Don't worry, that you lose interrupt. Interrupt flags is set regardless of the interrupt is disabled or enabled. Interrupt routine begins immediately after you enable interrupts.
     
     
    ... Oh yes, it's another way to do it:
    Take advantage of the priority of interrupts: Place your critical instructions in a separate interrupt routine, which has a higher priority than other interruptions. (For example - use NMI - can also be started by the software way, setting the corresponding flag in the registry).
    But Disable interrupts is easier method.
  12. Like
    nobody got a reaction from zeke in Launchpad Oscillator fault triggered   
    If you plan to permanently use the crystal, it is a good idea to remove the 0 Ohm resistors between oscillator and pin header. The basic idea is to minimize the size of the routes in the oscillator circuit. And of course set the appropriate size of capacitors (SLAU144H page 285).
  13. Like
    nobody got a reaction from yosh in MSP430F2274 TSSOP 38 Breakout board?   
    In the past I posted here my EAGLE file.
     
    Here are photos of boards which I made. Board for G2452 fits exactly into the launchpad!
     
    (New specimens are touch-screen ready, I'm curious to try it ...)
    BTW: don't forget to read slaa379 and slaa363a



  14. Like
    nobody got a reaction from GeekDoc in Help to optimize   
    Just one quick question:
     
    You turn on optimization in mspgcc?
     
    Tip can be found on this page: http://mspgcc.sourceforge.net/manual/c1509.html
     
    ... And one little hint: Try to change your code. Do not use LONG variables. Use only "natural" type of variables. For MSP430 natural types are INT, UNSIGNED, CHAR. Each non-natural type variable add additional libraries to your code.
  15. Like
    nobody got a reaction from pine in Launchpad Pin1.3 problem   
    Small warning for those who do not read manuals:
     
    TI produces for us a very good kit at a very competitive price. But no thing is not entirely perfect.
     
    Into this kit is pin P1.3 connected to button S2. OK, no problem. But for debouncing button, RC combination C34/R24 is also attached to P1.3.
     
    And here's the problem. C34/R24 is not detachable. Still not problem to us? Look to the simple sample code:

    #include "io430.h" #include "intrinsics.h" const unsigned char FONT[] = { 0x00, 0x06, 0x22, 0x00, 0x6D, 0x00, 0x00, 0x20, 0x39, 0x0F, 0x00, 0x70, 0x08, 0x40, 0x00, 0x52, 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x48, 0x48, 0x39, 0x48, 0x0F, 0x53, 0x00, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71, 0x6F, 0x76, 0x30, 0x1E, 0x76, 0x38, 0x15, 0x54, 0x3F, 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x2A, 0x76, 0x6E, 0x5B, 0x39, 0x64, 0x0F, 0x23, 0x08, 0x20, 0x77, 0x7C, 0x58, 0x5E, 0x79, 0x71, 0x6F, 0x74, 0x04, 0x1E, 0x76, 0x18, 0x15, 0x54, 0x5C, 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x2A, 0x76, 0x6E, 0x5B, 0x39, 0x30, 0x0F, 0x40, 0x00 }; // ASCII table [0x20 - 0xFF] /********************************************************************************************/ /* Test - minimalize power consumption of MSP430G2211 */ /* */ /* I use one character from the display LCD-S301C31TR, connected to port 1 */ /* P1.0 = Seg.A1, P1.1 = Seg.B1, P1.2 = Seg.C1, P1.3 = Seg.D1, */ /* P1.4 = Seg.E1, P1.5 = Seg.F1, P1.6 = Seg.G1, P1.7 = COM */ /* */ /* Power consumption is 76uA/3.5V, 65uA/3V, 33uA/1.5V (problem is RC of P1.3) */ /* Without P1.3 power consumption is 3.2uA/3.5V, 2.7uA/3V, 1.35uA/1.5V */ /********************************************************************************************/ int main( void ) { unsigned int i, j; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset BCSCTL3 |= LFXT1S1; // VLOCLK enable (my VLOCLK worked at ~~10kHz) TACCR0 = 50u - 1u; // 10kHz/200Hz = 50 - interrupt every 5msec (200Hz) TACTL |= TASSEL_1 + ID_0 + MC_1; // Timer A clock source select: 1 - ACLK = VLOCLK // Timer A input divider: 0 - /1 // Timer A mode control: 1 - Up to CCR0 TACCTL0 = CCIE; // Capture/compare interrupt enable __enable_interrupt(); //P1DIR = 0xFF; // Set all P1 to output direction // - alternative - P1DIR = 0xFF - BIT3; // Set all P1 to output direction (without P1.3) for(; // Never ending story { for(i=0; i<(128-32); i++) // Browse ASCII table chars [0x20 - 0xFF] { for(j=0; j<100; j++) // Any character displayed 0.5 sec { if(P1IN & BIT7) P1OUT = FONT[i]; else P1OUT = ~FONT[i]; __bis_SR_register(LPM3_bits); // ZZZZZZZZZzzzzzzz.......... // CPU, MCLK, SMCLK, DCO are disabled, ACLK are active } } } } #pragma vector = TIMERA0_VECTOR // Timer A CC0 __interrupt void DELAY(void) { __bic_SR_register_on_exit(LPM3_bits); // WAKE UP, BABY !!! }
     
    OK. The problem is here, what is the solution?
     
    1) Do not use P1.3 (not good, this small cheap chips have a few pins ...)
    2) Move your lovely chip out of the Launchpad to Breadboard. Thanks to SpyBiWire you need only four wires ...
    3) Simply ignore this problem
    4) Modify your Launchpad to fix this issue
     
    Modify. But how?
     
    My suggestion is: break the route from C34/R24 to pin P1.3 of IC1 socket. Remove pinheader J5. Drill two new holes between S2 and J5. Solder a new, six-pin header at location J5. Use two new pins on the pinheader for detachable connection from C34/R24 to button S2. Route S2 to P1.3.
     
    And that is all. End of story.
  16. Like
    nobody got a reaction from Rickta59 in Launchpad Pin1.3 problem   
    Small warning for those who do not read manuals:
     
    TI produces for us a very good kit at a very competitive price. But no thing is not entirely perfect.
     
    Into this kit is pin P1.3 connected to button S2. OK, no problem. But for debouncing button, RC combination C34/R24 is also attached to P1.3.
     
    And here's the problem. C34/R24 is not detachable. Still not problem to us? Look to the simple sample code:

    #include "io430.h" #include "intrinsics.h" const unsigned char FONT[] = { 0x00, 0x06, 0x22, 0x00, 0x6D, 0x00, 0x00, 0x20, 0x39, 0x0F, 0x00, 0x70, 0x08, 0x40, 0x00, 0x52, 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x48, 0x48, 0x39, 0x48, 0x0F, 0x53, 0x00, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71, 0x6F, 0x76, 0x30, 0x1E, 0x76, 0x38, 0x15, 0x54, 0x3F, 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x2A, 0x76, 0x6E, 0x5B, 0x39, 0x64, 0x0F, 0x23, 0x08, 0x20, 0x77, 0x7C, 0x58, 0x5E, 0x79, 0x71, 0x6F, 0x74, 0x04, 0x1E, 0x76, 0x18, 0x15, 0x54, 0x5C, 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x2A, 0x76, 0x6E, 0x5B, 0x39, 0x30, 0x0F, 0x40, 0x00 }; // ASCII table [0x20 - 0xFF] /********************************************************************************************/ /* Test - minimalize power consumption of MSP430G2211 */ /* */ /* I use one character from the display LCD-S301C31TR, connected to port 1 */ /* P1.0 = Seg.A1, P1.1 = Seg.B1, P1.2 = Seg.C1, P1.3 = Seg.D1, */ /* P1.4 = Seg.E1, P1.5 = Seg.F1, P1.6 = Seg.G1, P1.7 = COM */ /* */ /* Power consumption is 76uA/3.5V, 65uA/3V, 33uA/1.5V (problem is RC of P1.3) */ /* Without P1.3 power consumption is 3.2uA/3.5V, 2.7uA/3V, 1.35uA/1.5V */ /********************************************************************************************/ int main( void ) { unsigned int i, j; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset BCSCTL3 |= LFXT1S1; // VLOCLK enable (my VLOCLK worked at ~~10kHz) TACCR0 = 50u - 1u; // 10kHz/200Hz = 50 - interrupt every 5msec (200Hz) TACTL |= TASSEL_1 + ID_0 + MC_1; // Timer A clock source select: 1 - ACLK = VLOCLK // Timer A input divider: 0 - /1 // Timer A mode control: 1 - Up to CCR0 TACCTL0 = CCIE; // Capture/compare interrupt enable __enable_interrupt(); //P1DIR = 0xFF; // Set all P1 to output direction // - alternative - P1DIR = 0xFF - BIT3; // Set all P1 to output direction (without P1.3) for(; // Never ending story { for(i=0; i<(128-32); i++) // Browse ASCII table chars [0x20 - 0xFF] { for(j=0; j<100; j++) // Any character displayed 0.5 sec { if(P1IN & BIT7) P1OUT = FONT[i]; else P1OUT = ~FONT[i]; __bis_SR_register(LPM3_bits); // ZZZZZZZZZzzzzzzz.......... // CPU, MCLK, SMCLK, DCO are disabled, ACLK are active } } } } #pragma vector = TIMERA0_VECTOR // Timer A CC0 __interrupt void DELAY(void) { __bic_SR_register_on_exit(LPM3_bits); // WAKE UP, BABY !!! }
     
    OK. The problem is here, what is the solution?
     
    1) Do not use P1.3 (not good, this small cheap chips have a few pins ...)
    2) Move your lovely chip out of the Launchpad to Breadboard. Thanks to SpyBiWire you need only four wires ...
    3) Simply ignore this problem
    4) Modify your Launchpad to fix this issue
     
    Modify. But how?
     
    My suggestion is: break the route from C34/R24 to pin P1.3 of IC1 socket. Remove pinheader J5. Drill two new holes between S2 and J5. Solder a new, six-pin header at location J5. Use two new pins on the pinheader for detachable connection from C34/R24 to button S2. Route S2 to P1.3.
     
    And that is all. End of story.
  17. Like
    nobody got a reaction from zeke in Launchpad Pin1.3 problem   
    Small warning for those who do not read manuals:
     
    TI produces for us a very good kit at a very competitive price. But no thing is not entirely perfect.
     
    Into this kit is pin P1.3 connected to button S2. OK, no problem. But for debouncing button, RC combination C34/R24 is also attached to P1.3.
     
    And here's the problem. C34/R24 is not detachable. Still not problem to us? Look to the simple sample code:

    #include "io430.h" #include "intrinsics.h" const unsigned char FONT[] = { 0x00, 0x06, 0x22, 0x00, 0x6D, 0x00, 0x00, 0x20, 0x39, 0x0F, 0x00, 0x70, 0x08, 0x40, 0x00, 0x52, 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x48, 0x48, 0x39, 0x48, 0x0F, 0x53, 0x00, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71, 0x6F, 0x76, 0x30, 0x1E, 0x76, 0x38, 0x15, 0x54, 0x3F, 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x2A, 0x76, 0x6E, 0x5B, 0x39, 0x64, 0x0F, 0x23, 0x08, 0x20, 0x77, 0x7C, 0x58, 0x5E, 0x79, 0x71, 0x6F, 0x74, 0x04, 0x1E, 0x76, 0x18, 0x15, 0x54, 0x5C, 0x73, 0x67, 0x50, 0x6D, 0x78, 0x3E, 0x1C, 0x2A, 0x76, 0x6E, 0x5B, 0x39, 0x30, 0x0F, 0x40, 0x00 }; // ASCII table [0x20 - 0xFF] /********************************************************************************************/ /* Test - minimalize power consumption of MSP430G2211 */ /* */ /* I use one character from the display LCD-S301C31TR, connected to port 1 */ /* P1.0 = Seg.A1, P1.1 = Seg.B1, P1.2 = Seg.C1, P1.3 = Seg.D1, */ /* P1.4 = Seg.E1, P1.5 = Seg.F1, P1.6 = Seg.G1, P1.7 = COM */ /* */ /* Power consumption is 76uA/3.5V, 65uA/3V, 33uA/1.5V (problem is RC of P1.3) */ /* Without P1.3 power consumption is 3.2uA/3.5V, 2.7uA/3V, 1.35uA/1.5V */ /********************************************************************************************/ int main( void ) { unsigned int i, j; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset BCSCTL3 |= LFXT1S1; // VLOCLK enable (my VLOCLK worked at ~~10kHz) TACCR0 = 50u - 1u; // 10kHz/200Hz = 50 - interrupt every 5msec (200Hz) TACTL |= TASSEL_1 + ID_0 + MC_1; // Timer A clock source select: 1 - ACLK = VLOCLK // Timer A input divider: 0 - /1 // Timer A mode control: 1 - Up to CCR0 TACCTL0 = CCIE; // Capture/compare interrupt enable __enable_interrupt(); //P1DIR = 0xFF; // Set all P1 to output direction // - alternative - P1DIR = 0xFF - BIT3; // Set all P1 to output direction (without P1.3) for(; // Never ending story { for(i=0; i<(128-32); i++) // Browse ASCII table chars [0x20 - 0xFF] { for(j=0; j<100; j++) // Any character displayed 0.5 sec { if(P1IN & BIT7) P1OUT = FONT[i]; else P1OUT = ~FONT[i]; __bis_SR_register(LPM3_bits); // ZZZZZZZZZzzzzzzz.......... // CPU, MCLK, SMCLK, DCO are disabled, ACLK are active } } } } #pragma vector = TIMERA0_VECTOR // Timer A CC0 __interrupt void DELAY(void) { __bic_SR_register_on_exit(LPM3_bits); // WAKE UP, BABY !!! }
     
    OK. The problem is here, what is the solution?
     
    1) Do not use P1.3 (not good, this small cheap chips have a few pins ...)
    2) Move your lovely chip out of the Launchpad to Breadboard. Thanks to SpyBiWire you need only four wires ...
    3) Simply ignore this problem
    4) Modify your Launchpad to fix this issue
     
    Modify. But how?
     
    My suggestion is: break the route from C34/R24 to pin P1.3 of IC1 socket. Remove pinheader J5. Drill two new holes between S2 and J5. Solder a new, six-pin header at location J5. Use two new pins on the pinheader for detachable connection from C34/R24 to button S2. Route S2 to P1.3.
     
    And that is all. End of story.
  18. Like
    nobody got a reaction from GeekDoc in Electricity monitor - need some help   
    Copy Your code into an old, fully functioning project. You may have accidentally overwritten something in the default settings ...
  19. Like
    nobody got a reaction from GeekDoc in Electricity monitor - need some help   
    In IAR Embedded Workbench this code working too without any problems...
  20. Like
    nobody got a reaction from GeekDoc in Maris on Hackaday   
    New ideas are just lost memories...
     
    Many years ago I found these ontopic websites:
    http://www.shumatech.com/support/chinese_scales.htm
    http://www.nerdkits.com/videos/digital_calipers_dro/
     
    They are full of useful informations.
  21. Like
    nobody got a reaction from DrMag in Flashing the missing DCO calibration constants   
    IMHO it's not good idea, erase full segment A. There is probably stored more device-depended constants, not only DCO calibration. (Look at page 644 in slau144.pdf - "SegmentA structure"). Better idea is simply write those 3 missing constants (for 8, 12 and 16MHz) into the empty space (empty space contains 0xFFFF, is writable...).
     
    And more important info: You thinking about data integrity in segment A? Write the correct info into 0x10F6 (TAG_DCO_30 and length of DCO table)? Recalculate (and write) new checksum for segment A?
     
    For those, who want correctly change DCO constants:
    - Save full contents from segment A into RAM.
    - Change (in RAM) what You want, compute new checksum, etc...
    - And then write full block into erased segment A.
     
    I suggest You: look at page 649 and 650 in slau144.pdf.
     
    btw: the last version is slau144f.pdf
  22. Like
    nobody got a reaction from NatureTM in Flashing the missing DCO calibration constants   
    IMHO it's not good idea, erase full segment A. There is probably stored more device-depended constants, not only DCO calibration. (Look at page 644 in slau144.pdf - "SegmentA structure"). Better idea is simply write those 3 missing constants (for 8, 12 and 16MHz) into the empty space (empty space contains 0xFFFF, is writable...).
     
    And more important info: You thinking about data integrity in segment A? Write the correct info into 0x10F6 (TAG_DCO_30 and length of DCO table)? Recalculate (and write) new checksum for segment A?
     
    For those, who want correctly change DCO constants:
    - Save full contents from segment A into RAM.
    - Change (in RAM) what You want, compute new checksum, etc...
    - And then write full block into erased segment A.
     
    I suggest You: look at page 649 and 650 in slau144.pdf.
     
    btw: the last version is slau144f.pdf
×
×
  • Create New...