
enl
Members-
Content Count
346 -
Joined
-
Last visited
-
Days Won
22
Everything posted by enl
-
docs are the references above from TI. Google for SLAU319 and 320. This is really not a 30 second, one paragraph thing to answer. The protection is provided via a number of options using the same interfaces that are used for programming. The option with BSL is to set the password (32 bytes, which is a 256bit password) that will be required for the read command to be used to read the code memory, either via JTAG or BSL. Disabling JTAG reduces the risk of several possible exploits that can get information without an explicit read (see the docs on the CCC website for more info). NOTHING c
-
For information about the MSP430, see SLAU319, "Programming via the bootstrap loader", SLAU320, "Programming via the JTAG interface", and SLAU265, "MSP430 Memory programming" (outdated and superseded by the other two, but still useful) A summary: disable JTAG and password protect BSL access. If future access will be required for in circuit reprogramming, there are a variety of options, but the essence is that you set a password that prevents protected commands, like reading the program memory, via JTAG or BSL
-
In addition to undersampling the signal leading to loss of proper representation, the clock on the processor is NOT as accurate or as precise as a crystal oscillator. If the timing in your code was nominally perfect, it would still likely not match the real-world waveform timing, and not read at exactly the same point on the real world waveform each time, even if the real world wave had no error, which is unlikely. Undersampling IS used for a number of practical applications, but great care is needed to do it properly. Another issue, that again would affect you even with perfect clock, is
-
Short form: One interrupt is shared by all pins on a given I/O port. When the specified transition occurs on the pin (low to high or high to low), several things happen: The transition sets a flag in the port's interrupt register so the program can identify WHICH pin triggered the interrupt. If the processor is asleep, it is woken up. Then, the interrupt routine is called, which disables maskable interrupts. The line you asked about clears the interrupt bit for P1.3 so that the interrupt isn't retriggered when the interrupt handler ends. When the handler ends, unless you specify that t
-
At those currents, if you have the linear reg in hand, and can mount the heatsink, it will do the job. I have done such many times (back in the 70's and 80's, linear regs like the 7805 or LM317 were all we had off the shelf), and it works. But, as Spiralis said and I followed, the switcher reg is the better choice. The OKI-78SR he referred to is about as good as they get for off the shelf price/properties balance for this type of application. Never used that one myself, as I have a collection of switching drivers and inductors from an assortment of past projects, most of which were paid fo
-
Well, a lot of options, depending on application... What current? Is it relatively constant? Do you need 1/2amp? If the draw is below 25mA to 50mA average (over a time <1sec), the basic linear reg is a good choice here, as it is cheap and regulates well. At 50mA, you will be dumping about 500 to 600mW, which is into the range where you need to worry about rejecting the heat with a heatsink. Greater than 50mA, definitely a heatsink and other choices are likely better. Constant current (or fairly constant) up to the limit for the unit allows for the use of a series ballast power r
-
A few questions: What is the value representing? What range does the whole number part take?? Do you need to store more precision than the three digits after the decimal for any reason, or only those three? What RESOLUTION do you need? (0.001? 0.005? other?) Options, depending on the details, roeadrunner84's solution, where you maintain the float until the string generation, using the TI fixed point library for all of it, or doing the fixed point yourself using integers. For me to make a decision, I would need to know more detail, but my default would be the TI fixed point lib i
-
The first thing is that the numeric values, such as in the line `P1OUT = 01000000;' are treated as octal values due to the leading zero. Without a leading zero or base specified, numerics are treated as decimal. As you intend this to be binary, you can try `0b01000000'. Some compilers will accept this as binary, though it is not standard. The best way is use hexidecimal: `0x40', which all C compilers will accept.
-
transistor isolates the output from the MSP430 from the higher voltage. General electronics content: The npn transistor is off (no base current) until the emitter is significantly - about 0.3 or 0.4v - below the base voltage of 3.3v. Yes, the base-emitter junction acts as a diode, But the relevant part is the emitter current and the base current act as the control current for the collector in the beta gain model of a bipolar junction transistor. As the transistor turns on (when the emitter is pulled below the base voltage), current can flow from the collector to the emitter. The collector
-
The circuit I show enables the LED's when the input is pulled low. the npn switch to ground in your circuit is fine for enabling the LEDs when the output is high. Note the edit above
-
Next is putting in the second stage planet gears, first stage carrier/second stage sun, and first stage gears. Liberal use of good grease is recommended. I used lithium, but any plastic and aluminum safe NLGI 1 grease is fine. Last is put the pinion back on the motor, slip it in, and reinstall the spring pins. Then the drive is done. I reinstalled the original case parts so I won't need to make a special mount Dis-assembly is the reverse of assembly. Tweezers and needle nose pliers are key. Wipe parts and keep them clean. This unit has a net reduction of 81: two 9:1 stages... 6
-
Here is why the rebuild was needed: there is a brake built in to keep the outshaft from backdriving the motor. Problem is, once engaged, the motor can't turn. The outshaft needs to go to zero torque and slightly reverse to release it. It has to go to use the drive reliably in any project. IMPORTANT for ANY device with a torque limit clutch: Before dis assembly SET THE CLUTCH TO THE LOWEST SETTING so spring pressure is released, or you will be hunting pins and springs later The first pic shown the output shaft half of the output coupling. The six (three pairs) of jam rollers are act
-
Spent some time prepping for a new project, and realized I haven't seen the techniques I use shown, so I figured it is as good a time as any. There are likely people that could use the information, and I have a cat on my lap, so I have time. The project I am working on (to be disclosed if I get it done to m satisfaction) requires a pretty high torque, fairly fast drive. The requirement is to move about 10mm in 100mS, position withing 0.1mm, with a force of about 50N (3/8" motion to about 0.004", with a force of about 10Lbs, for those that are trapped in the world of imperial units). Not ea
-
This will damage the port pin in the MSP430, and may destroy the device. On or off, the pin will be exposed to 12V- the BE drop. I will reference you to the input stage of TTL logic as the basis for the attached. The transistor acts to isolate the pin on the MSP430 from the high potential, but all base current for the PNP transistor will be sunk by the MSP430. Edit: misplaced resistor in original.
-
Odd. Good luck ironing the rest of it out
-
Reverse the bit order of UCBRS=3 data bits, since they are given least to greatest in the table, which actually gives 0x2A, which gives slightly greater max error than the 'ideal' 0x4A, but the same average rate. I am not quite sure why they show 'ideal' modulation in slaa049 rather than the ones that the UART can actually do, but that is what they show. If you had UCA0MCTL = 0x06, then that was correct for 32KHz clock. DCO clock will allow you to use a larger divisor, so you can get much closer to the correct frequency. It should be more than accurate enough. As I said, It should be f
-
Ah... I see. UCAxMCTL 15.4.5: Bit 0 is UCOS16. Bits 1, 2, and 3 are for the modulation select. A modulator value of '3' is desired here (as per table 15.4) with a divider of 3. This gives best approximation to 9600 average by being an effective divider of 27/8 (three and three eighths). [32768/9600=3.41, which is about 1% greater than 27/8]. The modulation pattern produced by UCBRS=3 is 0x4A (see table 15.2.... note that the bits are shown in order used, which is low to high order) Therefore, you want UCA0MCTL to be 0bxxxx0110. The high order four bits don't matter, as they are ignored
-
Reference for reduced number of mod modes for g2553? I see nothing in the docs, and it has a UCA0MCTL register with no notations that I can see indicating that modulation is modified from the documentation in slau144. I will not exclude the possibility that I am missing something, as I can't recall for sure if I have used modulation on a g2553, though I think I have.
-
I was going to add to the original post when the system went down, so: The 20% error referred to in the table (15-4) is the worst error on an individual bit. The overall error for a given byte is significantly less. A 20% error for a single bit frame shouldn't be a bit issue, as the sample should be taken by the receiver at the center of the nominal bit frame. If both sender and receiver are off by 20%, in opposite directions, there is still some margin. I have used the 32KHz xtal with baud rate modulation without problems, though my default is to just clock the UART whatever DCO frequency
-
DCO will generally be within 5% (max over operating range is 6%, but it is usually better) when properly calibrated. If the factory data has not been overwritten, then you can set the DCO to one of four calibrated frequencies, including 1MHz and 16MHz to keep within 5 or 6%. You can check the calibration against the 32kHz xtal and trim the numbers to get closer, either by modifying the DCO constants or the settings for the UART clock. If the 32KHz xtal is already there, then by using more advanced features of the UART clock, you can do a lot better using the baud rate modulator than wi
-
Definitely worth checking, but unfortunately, depending on location, the closing stores may not have any discounts. My local store has none since unsold inventory is being moved to another store.
-
very nice. Temp depends on the solder being used (lead/tin, lead free silver bearing, antimony or cadmium silver bearing, etc) and the type of joint (large pad, surf mount small pads, wires, etc). I don't havea temp gauge. Just adjust it til it is right for the job: heat the joint in a few seconds to flow temp. Hotter is generally better if there is a question, as, if the solder or paste is there, as it melts, it will control joint temp. Once melted and flowed, iron is away. Too low a temp leads to overheating components before the solder flows.
-
Without volatile: The compiler recognises that the loop has no net effect and that the end result will be that b==0. Therefore, the loop is replaced with an assignment. With volatile: the compiler presumes that, even if it can't see it, something, somewhere, may be looking at the value of b other than the code in the loop. Therefore, it a.) compiles the code exactly as written, with b.) no optimizations, and c.) not using a register for the variable (it will always be in RAM, with the associated time penalty for access)
-
Short overview: There are several things that come into play with the timing a.) the internal ADC clock rate and ADC hardware, which limits you to a practical guarenteed sample rate of about 200KHz. This is due to the required number of clock cycles for an ADC conversion, the tolerance on the internal ADC clock, and the analog circuitry properties. b.) How often YOU request the ADC do a conversion. To sample at a given low rate, the structure I would use is, roughly: Set up a timer to interrupt at the desired sample rate. The interrupt handler requests the ADC to do a si
-
Low power Geiger counter with MSP430G2553 (Last updated: May 07, 2015)
enl replied to DeepBlueSky's topic in Projects
don' bother float.... If the value won't overflow (less than about 650*10^6 decimal), mult by 3 than divide by 100. The mult by three can be done as `(i<<1)+i'. This will give an int value truncated. You can avoid the div by 100 completely. After the sprintf, insert a decimal point before the last two digits. This requires that the value is >= 100 decimal, or there won't BE anything before the last two digits. This can be handled by forcing leading zeroes for 3 dig if value is <100 (using a condition and two sprintf's... one for each case)- 13 replies
-
- LaunchPad MSP-EXP430G2
- battery
- (and 4 more)