Professional Documents
Culture Documents
LUNCHBOX ECOSYSTEM Final
LUNCHBOX ECOSYSTEM Final
i msp430 lunchbox 5
1 microcontroller kits for the masses 7
2 microcontroller essentials 9
3 inexpensive msp430 evaluation kit: the msp430
lunchbox 11
4 comparing variants of ’apples’ 13
5 lunchbox (hardware) 15
6 writing your first code for lunchbox 21
ii appendix 23
a getting started with code composer stu-
dio (ccs) 25
b preparing your code template 31
c epilogue 35
3
Part I
MSP430 LUNCHBOX
1
MICROCONTROLLER KITS FOR THE MASSES
7
8 microcontroller kits for the masses
9
3
I N E X P E N S I V E M S P 4 3 0 E VA L U AT I O N K I T :
THE MSP430 LUNCHBOX
With the MSP430, the job is a whole lot easier. Turns out, the
MSP430 already has a built-in bootloader on-chip. All that is
required is a mechanism to invoke the bootloader and send
serial data to it- both of which can quite easily be achieved
by a USB to UART Bridge. One of the cheapest USB to UART
Bridge chips available in the market today is the CH340G -
a full speed USB device that emulates a standard serial in-
terface with speeds up to 2 Mbps and support for all mo-
dem handshaking signals- which costs less than half a dollar!
CH340 is also one of the major reasons for the 4$ Arduinos.
All this brings us to this - A $1 (conditions apply) MSP430
LunchBox- a low cost, maker-friendly microcontroller devel-
opment platform featuring the 20-pin MSP430G2553 Value
Line controller. The board supports any 14-pin or 20-pin DIP
package MSP430 G series microcontroller, which a hobbyist
can obtain for free through Texas Instruments’ free sample
programme. The entire bill of materials of the board, exclud-
ing the controller, is under $1. The PCB has been designed
11
12 inexpensive msp430 evaluation kit: the msp430 lunchbox
13
5
L U N C H B O X ( H A R D WA R E )
15
16 lunchbox (hardware)
Challenges Faced
1. While the MSP430 has an in-built UART bootstrap loader
(BSL), they are not brought out on the same pins as the
standard UART interface of the MSP430. This meant
that a provision for switching the CH340 USB to UART
Bridge between the BSL UART and the MSP UART pe-
ripheral - implemented using a pair of shorting jumpers
on board - had to be made.
Here are the PCB layout and a photo of the actual board.
6
WRITING YOUR FIRST CODE FOR
LUNCHBOX
21
22 writing your first code for lunchbox
Blink an LED
1 # i n c l u d e <msp430 . h>
2
3
4 /∗∗
5 ∗ blink . c
6 ∗/
7 void main ( void )
8 {
9 WDTCTL = WDTPW | WDTHOLD; // st op watchdog t i m e r
10 P1DIR |= 0xFF ; // c o n f i g u r e P1 . 7 as
output
11
12 v o l a t i l e unsigned i n t i ; // v o l a t i l e t o prevent
optimization
13
14 while ( 1 )
15 {
16 P1OUT ^= 0xFF ; // t o g g l e P1 . 7
17 f o r ( i = 1 0 0 0 0 ; i > 0 ; i −−) ; // delay
18 }
19 }
APPENDIX
A
G E T T I N G S TA R T E D W I T H C O D E C O M P O S E R
STUDIO (CCS)
Introduction
25
26 getting started with code composer studio (ccs)
Obtaining CCS
Installing CCS
31
32 preparing your code template
$BuildArtifactFileBaseName.txt
34 preparing your code template
35