Friday, December 31, 2010

Test Software Brain Blob Test

12-31-2010, 01:52 PM Code 5-85 Test Software - Brain Blob Test
The code pasted below can be used to test the LED data light mod. This code may appear elsewhere as BRAIN BLOB TEST.zip.


{{

The Brain Blob by Humanoido
brainblobtest.spin
LED Mod Test on the Brain Blob Project
Blinks LED on pin 24 using the Parallax Propeller Proto Board
(Use pin 23 for demo board testing of this software)
Friday December 31, 2010

}}

CON
  _clkmode      = xtal1 + pll16x ' 80MHz clock
  _xinfreq      = 5_000_000      ' 5MHz crystal
 LED            = 24             ' LED mod is on pin 24 Proto Board
' LED = 23                       ' pin 23 demo board
 delay          = 40_000_000     ' Approx 1 second on and off

PUB Main
  dira[LED] := 1          ' Set LED pin as output
'  dira[22]  := 1         ' correct ghost led on demo board
'  outa[22] := 0          ' correct ghost led on demo board
  outa[LED] := 1          ' Initialize pin on
  repeat                  ' Loop below
    blink                 ' Do Private Method to blink LED
  
PRI Blink                 ' Private Method to blink LED
  !outa[LED]              ' Toggle state LED
  waitCnt(delay+cnt)      ' Delay