
nobody
-
Content Count
94 -
Joined
-
Last visited
-
Days Won
1
Reputation Activity
-
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
-
nobody got a reaction from cde in Saving flash space, by making use of infomem
In IAR workbench use this way:
#pragma constseg = INFOB LUT_TABLE Lut_adc[2] = { -67, 10730, 0, 0, 0, // Input from U ADC 0L, 19476L, 0L, 0L, 0L, // Real measured U -59, 30680, 0, 0, 0, // Input from I ADC 0L, 39080L, 0L, 0L, 0L // Real measured I }; #pragma constseg = default #pragma constseg = INFOC const int Lut_pwm[2][LUT_PWM_SIZE + 1] = { 0, 907, 1814, 2721, 3628, 4535, 5442, 6349, 7256, 8163, 9070, 9977, 10884, 11791, 12698, 13605, // U to PWM 0, 986, 1972, 2958, 3944, 4930, 5917, 6903, 7889, 8875, 9861, 10848, 11834, 12820, 13806, 14792 // I to PWM }; #pragma constseg = default #pragma constseg = INFOD const int Factory_max_pwm_U = 8000; const int Factory_max_pwm_I = 3000; const int User_min_pwm_U = 0; const int User_max_pwm_U = 8000; const int User_min_pwm_I = 0; const int User_max_pwm_I = 3000; const int User_stored_pwm_U = 0; const int User_stored_pwm_I = 1; #pragma constseg = default
You be able to select concrete segment of info memory.
-
nobody got a reaction from pine in Hall effect sensor sensitivity
It is probably open-collector output (need a pullup resistor).
-
nobody got a reaction from larsie 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
-
nobody got a reaction from bluehash in IAR Code Size
Look here: http://www.43oh.com/forum/viewtopic.php?f=8&t=1468
-
nobody got a reaction from gwdeveloper in DIY Capacitative touch sensor
Look here: http://www.43oh.com/forum/viewtopic.php?f=8&t=411&start=10#p3396
-
nobody got a reaction from gwdeveloper 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
-
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.
-
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.
-
nobody got a reaction from babu in CNC-milling: create 3 different frequencies with MSP430G2553
Microstepping is good solution for remove "jagged lines" - it add smoothness to steppers movement.
My suggestion of "almost ideal" stepper controller:
- Use something from MSP430F53XX or MSP430F55XX series (this serie give you advantage of USB communication)
- Use 3 timers A to independent and precise frequence generating for 3 axes
- Use timer B with 7 registers for synchronously generating PWM signals for microstepping controll 3 axes (two signals for axis...)
- Use 3 DMA channels directed by timers A to move modified sinus tables into timer B registers to precise timed, software - independent stepper movement
- Then You have full potential of processor power for interpolation computing (hardware multiplier help you a lot)
- Price of F53XX or 55XX series is
-
nobody got a reaction from bluehash in Floating and fixed point math capabilities
Small mathematics:
You have 16 million clock cycles per second.
And you have 25 ms time window.
One machine instruction takes 1 to 6 clock cycles (eg, on average pessimistic 4 cycles?)
In our time window processor executes (16e6 * 25e-3 / 4) = 100,000 machine instructions.
And your second example - 10,000 machine instructions in time window.
Your simple math is piece of cake for this brute force ...
Your problem is memory. FP math library consumes lot of flash space. IMHO 4kB flash is minimum, 8kB is better.
Install IAR workbench, write a simple test version of its mathematics and run in the simulator. Then change target versions (in simulator) and select processor that is best for your application.
-
nobody got a reaction from bluehash in Tiny printf() - C version
In IAR workbench use this way:
Go to Project -> Options (Alt F7) -> General options -> Library options -> set Printf formatter to Tiny. This works for printf() and also for sprintf().
...and that's all, you don't need wrote any code (except of yours version of putchar() to LCD or serial port).
-
nobody got a reaction from ahgan84 in About simultaneous converting for ADC12
No. It is impossible.
Use chip with more than one independent ADC's (like MSP430AFE2xx). Or use external sample and hold devices.
-
nobody got a reaction from oPossum in Saving flash space, by making use of infomem
In IAR workbench use this way:
#pragma constseg = INFOB LUT_TABLE Lut_adc[2] = { -67, 10730, 0, 0, 0, // Input from U ADC 0L, 19476L, 0L, 0L, 0L, // Real measured U -59, 30680, 0, 0, 0, // Input from I ADC 0L, 39080L, 0L, 0L, 0L // Real measured I }; #pragma constseg = default #pragma constseg = INFOC const int Lut_pwm[2][LUT_PWM_SIZE + 1] = { 0, 907, 1814, 2721, 3628, 4535, 5442, 6349, 7256, 8163, 9070, 9977, 10884, 11791, 12698, 13605, // U to PWM 0, 986, 1972, 2958, 3944, 4930, 5917, 6903, 7889, 8875, 9861, 10848, 11834, 12820, 13806, 14792 // I to PWM }; #pragma constseg = default #pragma constseg = INFOD const int Factory_max_pwm_U = 8000; const int Factory_max_pwm_I = 3000; const int User_min_pwm_U = 0; const int User_max_pwm_U = 8000; const int User_min_pwm_I = 0; const int User_max_pwm_I = 3000; const int User_stored_pwm_U = 0; const int User_stored_pwm_I = 1; #pragma constseg = default
You be able to select concrete segment of info memory.
-
nobody got a reaction from itaytamir in WDT interrupt doesnt work
You do not understand at all.
Each pin you want to use the ADC must be set with
P6SEL |= BITx;
EXAMPLE (set P6.2, P6.3 and P6.5 to use as analog inputs):
P6SEL |= BIT2 + BIT3 + BIT5;
P6DIR worked for digital input/output, not for analog!
And next you must set ADC multiplexer - select a pin that is connected to ADC input.
ADC12MCTL0 = SREF_1 + INCH_2; // Channel A2 = P6.2, Vref+ //OR ADC12MCTL0 = SREF_1 + INCH_3; // Channel A3 = P6.3, Vref+ //ETC...
Only then you can run the ADC.
ADC12CTL0 |= ADC12SC; // Start conversions while (!(ADC12IFG & 0x0001)); // Conversion done? Your_Integer_variable=ADC12MEM0;
All these informations is in the TI examples!
And you need thoroughly reading [tipdf]SLAS508[/tipdf] and [tipdf]SLAU056[/tipdf] (at least the chapters dealing with the ADC).
-
nobody got a reaction from username in HD44780 issues
...and HERE, or HERE, is another one.
BTW: You need to improve our skills in using Google...
-
-
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
-
nobody got a reaction from oPossum in Launchpad with Stepper Motor
It IS a very bad idea connect any transistor directly to output of microprocessor. It is part of good manner to add resistor also between the processor and the gate of power MOSFET.
-
nobody got a reaction from MarkoeZ in Launchpad with Stepper Motor
Unfortunately I have for you the only bad news:
-There is nothing like "NPN mosfet"
- BD139 of course is not mosfet
-Is a very bad idea to connect output of processor directly to the NPN transistor.
It is necessary to add resistor around 220 - 1000 ohms between the processor and the base of power transistor. (Of course four resistors - one for each transistor)
And you also need antiparalel diode between collector and +power line. (cathode to collector and anode to +voltage). Something like 1N4001 - 1N4007 will be good.
-
nobody got a reaction from bluehash in Memory usage
First:
go to Project -> Options -> Linker -> List and check "Generate linker listing"
After you rebuild project, open file "YourProjectName".map in your Project tree. And at the low end of the file you find something like
908 bytes of CODE memory 80 bytes of DATA memory (+ 17 absolute ) 512 bytes of CONST memory
-
nobody got a reaction from stube40 in Trying to debug a weird reset issue on MSP430F2274
BOR (Brownout Reset) specification is at page 33 in slas504f.pdf. Specially look at part of sentence (2) - minimum voltage depends on the frequency. This dependence can be found on page 26.
Your first task should be to improve the power supply to eliminate voltage drops. (First, add more capacitors. If it does not work to divide the power into two separate parts. Separate stabilizer for CPU and one for peripherals. Use stabilizer with shutdown input (something like LP2951-33D) and you do not need use a switching transistor in the power bus).
Also: Remove the large capacitors in the switched part of the power bus. Their charge in turn causes a drop in supply voltage. It helps to add a small resistor (eg 10 to 100 Ohm) in series with the switching transistor.
-
nobody got a reaction from smiffy in Debugging A Timer
Big packet of usefull information you found in SLAA494.ZIP and SLAA494.PDF.
Little part from my code:
int main( void ){
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset
BCSCTL1 &= ~XT2OFF; // Activate XT2 high freq xtal
BCSCTL3 |= XT2S_2+LFXT1S_2; // 3
-
nobody got a reaction from kenemon in Rotary Encoder and the LP
My code (above) do it.
For this I also use RC debouncing. It's work perfectly.
A----[ 4k7 ]---------> (internal pullup in MSP430) | | = 10nF | | --- B----[ 4k7 ]---------> (internal pullup in MSP430) | | = 10nF | | --- SW-------------------> (internal pullup in MSP430) | | = 100nF | | ---
-
nobody got a reaction from zeke in Rotary Encoder and the LP
My code (above) do it.
For this I also use RC debouncing. It's work perfectly.
A----[ 4k7 ]---------> (internal pullup in MSP430) | | = 10nF | | --- B----[ 4k7 ]---------> (internal pullup in MSP430) | | = 10nF | | --- SW-------------------> (internal pullup in MSP430) | | = 100nF | | ---