newbie help needed on basic programming.
hi ppl, i have been having problems trying to even do simple single LED on and off setup on my BS2.
i'm using a board of education (Rev C)
BS2.
1 LED and 1 220 resister.
' {$STAMP BS2}
' {$PBASIC 2.5}
LOW 10
PAUSE 8
HIGH 10
END
this is all i typed but nothing seems to lights up.
i tried following exactly as the 1 in BS2 tutorial.pdf aso...but nothing is working.
i tried doing serial LCD. juz to switch on the backlit..but nothing is working as well..
ID icon shows tat everything is fine.
So can anyone advice me on wat can be the possible problem that i am facing here?
lots of thanks .
i'm using a board of education (Rev C)
BS2.
1 LED and 1 220 resister.
' {$STAMP BS2}
' {$PBASIC 2.5}
LOW 10
PAUSE 8
HIGH 10
END
this is all i typed but nothing seems to lights up.
i tried following exactly as the 1 in BS2 tutorial.pdf aso...but nothing is working.
i tried doing serial LCD. juz to switch on the backlit..but nothing is working as well..
ID icon shows tat everything is fine.
So can anyone advice me on wat can be the possible problem that i am facing here?
lots of thanks .
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
very sure on that..
' {$STAMP BS2}
' {$PBASIC 2.5}
SEROUT 14,84,[noparse][[/noparse]22,12,17]
PAUSE 5000
SEROUT 14,84,[noparse][[/noparse]"hi hi",13,
············· "cya"]
END
Is this a correct command to display LCD?
do u know wat does 84 means?
i wish to light up the backlit, according to the pdf, 17 to light up..but it does not.
nothing is displayed upon download of program.
·· Whoa!· Let's slow down/backup-up a bit...We haven't even helped you with the LED and you're on to something else·more complex.· On your LED, the way you have the code, presumably the LED is active-low, which means that the Anode should be connected to Vdd and the Cathode to the I/O pin (through the 220-ohm resistor, of course).· The problem is that your PAUSE statement is set for only 8 ms, which isn't really enough time to see anything.· Then you turn the LED off and end the program.· I would recommend reading the "What's A Microcontroller?" tutorial, which you can download for free in PDF format at the link below (botttom of page).· It starts off with blinking an LED and gradually gets into more advanced things.· I hope this helps.· Take care.
http://www.parallax.com/detail.asp?product_id=28152
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
' {$STAMP BS2}
' {$PBASIC 2.5}
DO
LOW 10
PAUSE 500
HIGH 10
PAUSE 500
LOOP
i took the advice and yup..LED is working... =-)
i studied microcontroller b4.. but i deal with Microchips product...
this is my 1st time looking at PBasic
one thing i'm not familiar with in Pbasic is this words
SEROUT TxPin, Baud19200, [noparse][[/noparse]$F8,$02,$0D,$08,$14,$10,$09,$0D,$02]
does $ refers to Hex value?
and the number is the value?
·· Correct...Values preceeded by $ are HEX values.· That is to say this is how the programmer is referring to the values.· Whether you specify HEX, Binary or just use plain old decimal, the data all goes out the serial pin the same way (binary bits).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
You have been a great help
Still working on my programming as of now. ^^"