This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 Chip Selection/ Specification

Other Parts Discussed in Thread: MSP430F5418A, MAX3232, MSP430F5507, MSP430F5510

I am looking for a low power chip, mostly for stand alone usage that will be able to interface with a desktop or mobile phone via USB when required and has the following rough specification:

-Vdd = ~3.7V

-2 x Digital High/Low (1.2V min high, 0.6V max low) output

-2x PWM output

-Built in crystal oscillator

-Low standby power consumption

-Random number generation library or similar

-Some programming variables avaiable to be reprogrammed by end user over USB

-Time tracking ability (millis() or similar)

- 32kb memory or greater

-Single button digital high/low input

I think I have found a chip that will meet these requirements in the MSP430F5503 but I am keen to see what others think before I proceed to order the evaluation board.

Many thanks,

Andy

  • Andrew Hayward said:
    -Vdd = ~3.7V

    Maximum supply for MSP430 series is 3.6V

    Andrew Hayward said:
    -2 x Digital High/Low (1.2V min high, 0.6V max low) output

    Depends on current drawn, but all MSPs have several (8 to 87) digital I/O and for currents up to 1-2mA none of them has problems getting as low as 0.3V and as high as VCC-0.3V.

    Andrew Hayward said:
    -2x PWM output

    All MSPs have at least one timer with PWM capability. However, most of the G2 series allow only one PWM output. All others have at least two and up to 6 per timer. PWM frequency must be the same for all PWM outputs of one timer.

    Andrew Hayward said:
    -Built in crystal oscillator

    All MSPs have built-in digitally controlled oscillator, but none has internal crystal. However, all MSPs support at least an external watch crystal and most support one or two external high-speed crystals.

    Andrew Hayward said:
    -Low standby power consumption

    Plain ram data retention current is a few µA. However, the more other circuitry you use, the higher the current consumption is.

    Andrew Hayward said:
    -Random number generation library or similar

    Real random numbers are difficult. But several people have created several tricks to produce a randum value or at least a random seed for a pseudo-random generator. Including ADC converison of noise, comparing crystal and DCO speed and othe rmeans.

    Andrew Hayward said:
    -Some programming variables avaiable to be reprogrammed by end user over USB

    If you really want an USB interface, there are only two or so MSPs with internal USB controller.
    Alternatively, you can use an USB/ser converter and send your data serially. Almost all MSPs have a hardware UART. And are able to runtime-program teh internal flash.

    Andrew Hayward said:
    -Time tracking ability (millis() or similar)

    Well, that's what tiemrs are for. You can even use the same timer that does your PWM and coutn the timer cycles for your timing. On MSPs with more than one timer, one can do the timing whiel the other doe sthe PWM. There are some MSPs with internal RTC but this is not suitable for ms timing.

    Andrew Hayward said:
    - 32kb memory or greater

    Most of the 5x family have more than 32k. Also some of the 2x family offer up to 128k flash.

    Andrew Hayward said:
    I have found a chip that will meet these requirements in the MSP430F5503

    Keep in mind that the more features the device has, the more difficult is it to tame it for lowest power. This includes the USB controller of the F5503. The MSP430F5418A might be a good choice too. Together with an external USB/ser converter (specifically one with TTL outputs rather than RS232)  that is only attached when needed and completely removes the USB part from the module power domain. Laso, programming the URT is much, much easier (and requires by magnitudes less code) than implementing an USB end device stack.

  • Thank you so much for such a comprehensive reply Jens-Michael. I have a few questions in response:

    1) In the datasheet for the range is the Internal Very-Low-Power Low-Frequency(LF) Oscillator referring to the DCO?

    2) I hadn't realized that the inbuilt USB would be problematic for power consumption. USB connection would only be required for perhaps only 1 minute a day to upload to a desktop/mobile phone how many times the MSP430 device and outputs had been activated. The board must have a micro-USB connection due to packaging constraints. If an external converter to the circuit board is not possible, what would you suggest? Sending data serially is perfectly fine.

    I have mostly worked with the Arduino platform, but am now trying to downsize to a board much smaller with lower power consumption -so this is a bit of a learning curve - thanks for bearing with me

    I have an evaluation board for a motor controller on and that uses a MSP430G2x53 which seems very attractive due to the low BOM - although I don't require any capacitive sensing.

  • Andrew Hayward said:
    1) In the datasheet for the range is the Internal Very-Low-Power Low-Frequency(LF) Oscillator referring to the DCO?

    No.

    The 5x/6x family has four internal oscillators:

    1. The DCO is a multi-frequewncy, digitally controlled oscilaltor with a fprogrammable range of ~100kHz to ~100MHz. However, only 256 discrete frequencies are selectable (and they differ from MSP to MSP). By modulating between two adjacent frequencies, 31 more 'average' frequencies can be selected between each two steps. Furthermore, an FLL mechanism can adjust this modulation based on a reference frequency, giving you an averaged average frequency over a longer period of time.
    2. The REFO is a factory-calibrated (~+-1%) 32768Hz oscillator that can serve as reference for the FLL or oteh rtiming jobs, as alternative to a (mroe precide btu also a littel more power consuming external watch crystal).
    3. the MODOSC is a free-running oscillator in the range of ~5MHz, used for ADC operations and for the flash controller when writing flash.
    4. The VLO is a very low power low frequency oscillator which has a huge tolerance (4-20kHz) high temperature drift and VCC-based rift, but can serve as an untra-low power consumption oscilaltor if you just need a clock to span longer periods of inactivity and don't care for precision.

    Unused oscillators are either auto-deactivated (REFO,MODOSC) when not used or can be manually deactivated (DCO).

    Andrew Hayward said:
    I hadn't realized that the inbuilt USB would be problematic for power consumption.

    Well, IIRC; it is possible to shut down the USB controller completely if there is no VUSB (USB not connected). However, other aspects make it difficult to handle (inlcuding the requirement of an external high-speed crystal for USB operation) if you want to switch between USB operation and low-power. Not impossible, just difficult. And of course you have to deal with the PC drivers for the USB 'device' etc.
    Using an existing external USB/ser converter (e.g. based on commonly used FT2232D where royalty-free Win/Mac/linux virtual COM port drivers already exist -  if the MSP is running on 3.3V, the FT2232D can interace it without any additional components) is by far easier. People will already need an USB/microUSB cable, so why not giving them an USB/ser cable instead?
    If a simple 3.5mm earphone jack is too large for your applicaiton, you can still (ab)use a microUSB plug but use only shield and data lines for GND and RX/TX.

    Andrew Hayward said:
    If an external converter to the circuit board is not possible, what would you suggest?

    For copnnecting the MSP directly to a COM port (RS232) a level shifter IC is required (e.g. MAX3232 and a few capacitors). However, many devices doN't have real COM ports anymore and an USB/ser converter is required anyway to provide one. So why not coming with an own verison that will also remove the requirement of teh level shifter? :)

    The G255x53 also has an internal hardware UART for serial communication. However, The G series is rather limited in ram, flash (code size) and also has only one timer. Also, it has no REFO or FLL and does not support an external high-speed crystal, so a reliable serial connection with >9600Bd isn't possible and even for this, an external watch crystal is required. 2400Bd should be preferred, even though the hardware UART could support 1MBd with a proper (externally applied) clock signal. Well, with some effort, a software UART could be implemented that gathers its timing from the incoming signal. The BSL software UARTs in some MSPs work this way (see BSL applicaiton note and BSL demo code)

  • Take a look at energy micro. They have a lot of low power micros based on the ARM core

  • Jens-Michael Gross said:
    The REFO is a factory-calibrated (~+-1%) 32768Hz oscillator that can serve as reference for the FLL or oteh rtiming jobs, as alternative to a (mroe precide btu also a littel more power consuming external watch crystal).

    I thought the REFO consumes several times the current compared to the watch crystal on LFXT (~3uA vs ~0.3uA), and that its main advantages are the absence of an external component and the much faster start-up time (~25us vs ~500ms).

    The USB module on the MSP430F55xx parts do not consume current if not in use; the transceiver and the PLL are on a separate power domain from the rest of the MCU and can be powered directly from the USB VBUS. They also have a dedicated flash-based bootloader that can do reprogramming over the USB, entered by pulling the PUR pin high during start up. It uses the USB HID device class, so no drivers necessary, and TI provides an example application to interface a PC with the bootloader. See http://www.ti.com/litv/pdf/slaa452b

    Tony

  • SHau said:
    Take a look at energy micro. They have a lot of low power micros based on the ARM core

    Well, in the ARM world, they have a slighly different understanding of what 'low power' means. Relative to the computing power, this might be correct, but in absolute values...

  • Thank you both for the information.

    Because of the difficulties in making the device compatible with both Iphone and Android in a single unit it seems best that I use FSK with a software modem kind of setup and transmit data via a 3.5mm input jack.

    This means that I would need a total of 4 pwm pins, each with a different frequency... the search continues!

  • Sorry Jens-Michael, you said before that:

    "All MSPs have at least one timer with PWM capability. However, most of the G2 series allow only one PWM output. All others have at least two and up to 6 per timer. PWM frequency must be the same for all PWM outputs of one timer."

    I was under the impression that with most chips you could use a single timer for multiple PWM outputs, but the prescaler has to remain constant? Or is this a software trick?

  • Jens-Michael Gross said:

    Take a look at energy micro. They have a lot of low power micros based on the ARM core

    Well, in the ARM world, they have a slighly different understanding of what 'low power' means. Relative to the computing power, this might be correct, but in absolute values...

    [/quote]
     
    But not the parts from EM
  • Andrew Hayward said:

    I use FSK with a software modem kind of setup and transmit data via a 3.5mm input jack. This means that I would need a total of 4 pwm pins, each with a different frequency... the search continues!

    Four PWM pins? You mean four timers? - AFAIK two PWM pins of single timer cannot generate different frequencies simultaneously. 4FSK modulation needs single timer/pin output. Duo-tone coding like DTMF needs two pins/timers. Other option is hardware DAC + DMA and plenty of sample memory for waveforms. Using precalculated PWM (bit) patterns you can make 1-bit DAC out of SPI peripheral & R/C filter :)

    20kHz bandwidth (40ksps) input is doable with ADC10, you just need enough CPU power for demodulation.

    What bitrate you want to achieve? Maybe we are building plane but you need bicycle?

  • Thanks Ilmars. That was what I was asking really, whether you could run two PWM pins off a single timer at different frequencies. I managed to find this document earlier that seems to indicate you can, but with some restriction: http://www.ti.com/lit/an/slaa513/slaa513.pdf

    I would use one pin as FSK in, and another as FSK out, using two different (or perhaps even 4) different) PWM levels (frequencies) to modulate the square wave. The other 2 PWM pins I need would be the input to two separate motor controllers located elsewhere on the circuit.

    I do need a bicycle, a transfer rate of 500 to 1000 bits per second would be fine.

    The MSP430F5507 would suit my needs for this I *think* but it only comes in 48VQFN so I would need the MSP430F5510 which then comes in the 64QFN package for the evaluation tool.

    I hope what I'm saying makes some sense!

  • You don't need to waste timers and CPU resources using more than 2-FSK modulation for 1000bps. FSK-out is easy. Thou you need not only modulator timer, but baud timer too. If UART is at your disposal then you can use it as timer for baudrate generation: connect UART TX to two input pins, configure one for rising other for falling edge and in pin change interrupt routine do "modulator" frequency change accordingly. Besides you can count modulator cycles, but it' s CPU-intensive. FSK-in will be little more tricky. You need to amplify input audio signal so you are getting clipping at digital i/o pin, sample input pin (emulating 1-bit ADC) at known sample rate and do some Goertzel math. Idea how to do tone detection: http://www.dattalo.com/technical/theory/dtmf.html BTW you can sample input pin using 16-bit SPI which automagically gives you 1) sampling timer 2) greatly reduce interrupt rate.

  • Andrew Hayward said:
    Thanks Ilmars. That was what I was asking really, whether you could run two PWM pins off a single timer at different frequencies. I managed to find this document earlier that seems to indicate you can, but with some restriction: http://www.ti.com/lit/an/slaa513/slaa513.pdf

    Yes, hardware PWM uses teh same (CCR0-defined) PWM frequency for all other CCRx units.

    Using the approach from this appnote is hardware-supported software PWM. Here the PWM frequency and duty cycle are controlled by software, but the output change is done by hardware and eliminates the jitter that would appear on a plain software controlled GPIO output.
    You already mentioned the restrictions.

    Andrew Hayward said:
    I hope what I'm saying makes some sense!

    Well, I'd question the 'need' of FSK and therefore the need of 4 PWMs. Also, FSK can be done without PWM. OYu can use the USCI to send out 8 bits with programmable frequency. and for input, there are othe rmethods as well. Or oyu use an external chipt hat doe smodulation and demodulation.

    However, what is the final applicaiton fo all this? maybe other approaches give the same result for much less hasssle.

  • Jens-Michael Gross said:
    maybe other approaches give the same result for much less hasssle.

    Like serial bluetooth module.

  • I had considered a Bluetooth module first of all, well, the very good TI SoC which uses an integrated MSP430. The problem is that this cost, the pre-certified module is £10 in quantities of 500, which is far too high for the application. Spending the money on certification for a module of my own design (both national and with the Bluetooth regulation body and then the licensing) is too great for what is essentially a self funded start up.

    I managed to find this link http://www.ti.com/lit/an/slaa204/slaa204.pdf - "MSP430 Embedded Soft-Modem Demo" which seems to hit the nail on the head for what I need. To be completely honest I understand little of the terminology at the moment when it comes to data transmission, but I've ordered a development board to have a play around with, I find my head stuck in the "bit banging" software mode of thought, obviously this needs to make best use of the hardware.

    Thanks for the help - I'll report back my findings in a couple of weeks for anyone else that might be interested

**Attention** This is a public forum