; ---------------------------------------------------------------------- ; CF430G2553 is a Forth based on CamelForth ; for the Texas Instruments MSP430 ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 3 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program. If not, see . ; ; See LICENSE TERMS in Brads file readme.txt as well. ; ---------------------------------------------------------------------- ; LaunchPad.s43 - LaunchPad Suporting Words - MSP430G2553 ; ---------------------------------------------------------------------- ;U PORTS --------------------------------------------------------------- ; TI document SLAU144I - December 2004 - Revised January 2012 ; The digital I/O registers are listed in Table 8-2. ;U \ P1in = $20 ;U \ P1out = $21 ;U \ P1dir = $22 ;U \ P2in = $28 ;U \ P2out = $29 ;U \ P2dir = $2A ;U \ LED - portpinX->---resistor---LED---GND ;U \ P1.0 - red LED ;U \ P1.6 - green LED ;U RED -- mask port red LED mask and port address HEADER red,3,'RED',DOTWOCON DW P1OUT DW 00000001b ;U GREEN -- mask port green LED mask and port address HEADER green,5,'GREEN',DOTWOCON DW P1OUT DW 01000000b ;U \ Switch S2 ;U portpin P1.3 --->0_0----GND ;U S2 -- mask port second button mask and port address HEADER S2,2,'S2',DOTWOCON DW P1IN DW 00001000b ;U S2? -- f test button S2, true is pressed HEADER SQEST,3,'S2?',DOCOLON DW S2, cget, ZEROEQUAL, EXIT ; ----------------------------------------------------------------------