
;------------------------------------------------------------------------------
; Common and useful Forth basis definitions for MSP430G2553 in Launchpad
;------------------------------------------------------------------------------

-Port definitions
-Hardware initialisations
-PWM on green led
-Random numbers
-Temperature and Vcc measurement
-Simple busy wait routines
-Cornerstone to delete parts of flash and an hexdump tool

Put the output of hexdump at the beginning of the vanilla 0.9 forth-mecrisp-2553.hex file 
to generate a new hex file that includes your dictionary contents and can be used to clone
finished forth projects !

Try:

: ?button   ( -- Flag ) 8 p1in cbit@ not ;
: led-red   ( Flag -- ) if  1 p1out cbis! else  1 p1out cbic! then ;
: led-green ( Flag -- ) if 64 p1out cbis! else 64 p1out cbic! then ;

?button led-red

1024 pwm-init
1 pwm
10 pwm
200 pwm
500 pwm
1000 pwm 
