01-03-2011, 01:20 PM CODE 5-95 Software Test 2
It became necessary to have a small program for testing the data light to ascertain the current draw and compare the LED on the Parallax Propeller Proto Board (PPPB) with another one on another pin (mounted on the breadboard).
Attached is testing Spin software for three types of LEDs.
1) On the Demo Board to test the software
2) Surface mount LED on the PPPB
3) LED on the breadboard
Pins are listed in the code and remarks.
The delay between on/off cycles was increased to allow for ammeter settle time between reads.
It became necessary to have a small program for testing the data light to ascertain the current draw and compare the LED on the Parallax Propeller Proto Board (PPPB) with another one on another pin (mounted on the breadboard).
Attached is testing Spin software for three types of LEDs.
1) On the Demo Board to test the software
2) Surface mount LED on the PPPB
3) LED on the breadboard
Pins are listed in the code and remarks.
The delay between on/off cycles was increased to allow for ammeter settle time between reads.
The Brain Blob by Humanoido
brainblobtest2.spin
Sunday January 03, 2011
LED Testing for the Brain Blob Project
Blinks LED on pin 24 and/or 25 using the Parallax Propeller Proto Board
Use pin 23 for demo board testing of this software
Use pin 24 to test the Parallax Propeller Demo Board modification (on board LED)
Use pin 25 to test resistors for LED on the breadboard.
Rem out statements to select pins
}}
CON ' Constants
_clkmode = xtal1 + pll16x ' 80MHz clock
_xinfreq = 5_000_000 ' 5MHz crystal
' LED1 = 24 ' LED mod is on pin 24 Proto Board
LED2 = 25 ' This LED is on the breadboard
' LED = 23 ' pin 23 demo board
delay = 160_000_000 ' Delay enough for ma reading to settle
PUB Main ' Main method
' dira[LED1] := 1 ' Set LED pin as output
dira[LED2] := 1 ' Make pin 25 output
' dira[22] := 1 ' correct ghost led on demo board
' outa[22] := 0 ' correct ghost led on demo board
' outa[LED1] := 1 ' Initialize pin on pin 24
outa[LED2] := 1 ' Light the LED on pin 25
repeat ' Loop below
blink ' Do Private Method blink LED
PRI Blink ' Private Method to blink LED
' !outa[LED1] ' Toggle state LED
!outa[LED2] ' Toggle state - Light the LED on pin 25
waitCnt(delay+cnt) ' Delay