Archive

Archive for February, 2011

AMD V Series V140 benchmark

February 28th, 2011 No comments

Some of the benchmark results of the V-Series V140 processor has become available and are being reproduced here for the comparison in the table below.

Benchmark Score

SL No. Benchmark name
1 Super Pi 2M 80 seconds
2 3D Mark 06 990
3 Passmark Score 769

The super Pi 2M takes 80 seconds for the V140. By comparison, the 2.3 GHz single core Celeron 900 81 seconds – roughly about the same. AMD’s own dual core 1.3 GHz Athlon II Neo K325 also stands in the similar performance range. In general, this processor is decent for entry level computing but not good if you are looking for moderate computing, fast boot up.

How exactly the V140 compare with Intel’s Celeron 900 – another entry level processor – read in next post.

Categories: Uncategorized Tags:

MSP430 Launchpad (MSP-EXP430G2)

February 28th, 2011 No comments


For the cost of a sandwich, you get a complete and easy to use MSP430 tool, that can be used to kickstart your learning and development of MSP430. Yes – the MSP430 costs just $4.30 and has everything that you need to kickstart your project.

Launchpad integrates a DIP Target, that can support upto 20 pins. This allows the MSP430 Value Line to be inserted into the socket and you are ready to start your development work. The Launchpad also has on board push buttons, LEDs and IO pins for communicating with external devices.

What do you get for $4.30

For $4.30, you get MSP430 Launchpad that has a development board ( a fully Assembled baord), 2 programmable MSP430 microcontrollers, one mini-USB cable, PCB connectors for expandability, external crystal for increased clock accuracy, and free & downloadable software integrated development environments (IDEs) – everything you need to get started today.

Scalable – The LaunchPad is a simple introduction to the MSP430 microcontroller family. As application requirements change, programs developed on the LaunchPad can be migrated to higher end MSP430 devices.

Categories: Uncategorized Tags:

MSP430 List of Books and Resources

February 28th, 2011 No comments
Categories: Uncategorized Tags:

MSP430 Analog to Digital Conversion Tutorial

February 28th, 2011 1 comment

Some of the MSP430 series processors ( for example MSP430F149) supports 12 Bit A to D ( Analog to Digital conversion ports ) that can be used to monitor and Analog signal level. This code is slighhtly modified version of a code available at Texas Instruments’s website. The Input port has been changed from A0 to A1 for analog input.

MSP430 A/D conversion example

Here is the MSP430 example code for the analog to digital conversion. Hook up a analog supply source ( for example a battery) at port Pin A1 of the MSP430. When the supply voltage increases beyond 1.5V, you will LED going ON

//******************************************************************************
// MSP-FET430P140 Demo – ADC12, Sample A1, Set P6.2 if A1 > 0.5*AVcc
//
// Starredreviews description
// Description: A single sample is made on A0 with reference to AVcc.
// Software sets ADC10SC to start sample and conversion – ADC12SC
// automatically cleared at EOC. ADC12 internal oscillator times sample (16x)
// and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC12
// conversion complete, ADC12_ISR will force exit from LPM0 in Mainloop on
// reti. If A0 > 0.5*AVcc, P6.2 set, else reset.
//
// MSP430F149
// —————–
// /|\| XIN|-
// | | |
// –|RST XOUT|-
// | |
// Vin–>|P6.1/A1 P6.2|–> LED
//
// starredreviews.com
// Original code from Texas Instruments
//******************************************************************************

#include

void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop Watch Dog Timer
ADC12CTL0 = SHT0_2 + ADC12ON; // Set sampling time, turn on ADC12
ADC12CTL1 = SHP;
ADC12IE = 0x01; // Enable interrupt
ADC12MCTL0 = 0x01 ;
ADC12CTL0 |= ENC ; // Conversion enabled
P6SEL |= 0x02 ; // P6.1 ADC option select
P6DIR |= 0x04; // P6.2 is output for LED

for (;;)
{
// This should actually happen in a timer interrupt where
// we may like to sample only once in, say 1 second

ADC12CTL0 |= ADC12SC; // Sampling open
_BIS_SR(CPUOFF + GIE); // LPM0, ADC12_ISR will force exit
}
}

// ADC12 interrupt service routine
// Comments by starredreviews.com

#pragma vector=ADC12_VECTOR
__interrupt void ADC12_ISR (void)
{

if (ADC12MEM0 < 0x7FF)
P6OUT &= ~0x04; // Clear P6.2 – LED off
else
P6OUT |= 0x04; // Set P6.2 – LED on
_BIC_SR_IRQ(CPUOFF); // Clear CPUOFF bit from 0(SR)
}

Copy paste this code in your IAR embedded system and run the code.

Some light exercises –

1. Change the program so that instead of the infinite for loop the Analog to digital conversion is done every one second.

2. At every one second output the value of the voltage at the serial port.

Categories: Uncategorized Tags:

Serial Ports in MSP430

February 28th, 2011 No comments

Let us extend the example in the previous tutorial, which sent out characters from A to Z. In this tutorial we will do the reverse. A character will be sent out from the hyperterminal of your PC to the MSP430 at 9600 baud rate ( No Parity and one stop bit) and the MSP430 will echo the character back. The Echoed character can be read at the serial port.

MSP430 Serial Port Echo Program

#include <io430x14x.h>

//******************************************************************************
//  MSP-FET430F149  USART0, UART 9600
//
//  Starredreviews Description: Echo a received character, RX ISR used. Normal mode is LPM0,
//  USART0 RX interrupt triggers TX Echo. Though not required, MCLK = LFXT1
//  ACLK = MCLK = UCLK0 = LFXT1 = 3.58MHz
//  Baud rate divider with 3.58Mhz XTAL @9600 = 3.58MHz/9600 = 372 (0174h)
//  //* An external 3.58Mhz XTAL on XIN XOUT is required for ACLK *//
//
//                MSP430F149
//             —————–
//         /|\|              XIN|-
//          | |                 | 3.58MHz
//          –|RST          XOUT|-
//            |                 |
//            |             P3.4|————>
//            |                 | 9600 – 8N1
//            |             P3.5|<————
//
//
// starredreviews.com tutorial
//******************************************************************************

void main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW + WDTHOLD;                 // Stop Watch Dog
P3SEL |= 0x30;                            // P3.4,5 = USART0 TXD/RXD
BCSCTL1 |= XTS;                           // ACLK = LFXT1 = HF XTAL

// Starredreviews.com codes

do
{
IFG1 &= ~OFIFG;                           // Clear OSCFault flag
for (i = 0xFF; i > 0; i–);               // Time for flag to set
}
while ((IFG1 & OFIFG));                   // OSCFault flag still set?

BCSCTL2 |= SELM_3;                        // MCLK = LFXT1 (safe)
ME1 |= UTXE0 + URXE0;                     // Enable USART0 TXD/RXD
UCTL0 |= CHAR;                            // 8-bit character
UTCTL0 |= SSEL0;                          // UCLK = ACLK
UBR00 = 0x74;                             // 3.58Mhz/9600 – 372
UBR10 = 0x01;                             //
UMCTL0 = 0x00;                            // no modulation
UCTL0 &= ~SWRST;                          // Initialize USART state machine
IE1 |= URXIE0;                            // Enable USART0 RX interrupt

_BIS_SR(LPM0_bits + GIE);                 // Enter LPM0 w/ interrupt
}

#pragma vector=USART0RX_VECTOR
__interrupt void usart0_rx (void)
{
while (!(IFG1 & UTXIFG0));                // USART0 TX buffer ready?
TXBUF0 = RXBUF0;                          // RXBUF0 to TXBUF0
}

Copy paste this starredreviews.com code in your IAR embedder system and run the code. Whatever you write on the Hyperterminal in echoed back by the MSP430.

Some easy exercise for you- change the program so that it writes the next letter – for example if you write A – it should echo B.

Categories: Uncategorized Tags: