Wednesday, September 22, 2004

mr. board meet mr. computer

output from my serial communication test is a success. soldered the headers to the serial piece. check this out...

Hello Wo2ld!
Hell/ World!
HòHello WoòHello World!
Hello World!
€‹ë ºHª±±½World!
Hello World!
Hell World!
HelloÿWorld!
ello WoRld!
HÉllo World!
Hello World!
HËllo ׽ɱ‘…
Hello World!
ý

here's the code.

'---------------------------------------------------------
input portb.0
output portd.0
OUTPUT portc.6

main:
if portb.0 = 1 then ' if the switch is closed on pin RB0
low portd.0 ' set pin RD1 low
else
high portd.0 ' set RD1 high
SEROUT2 portc.6, 16468, ["Hello World!", 10, 13]
endif

goto main
'---------------------------------------------------------

Hello world indeed. not sure why the characters are goofy but it works. next i'm going to wire my pants to talk to my shoes and my shoes to talk to the floor. it's gonna be great.

0 Comments:

Post a Comment

<< Home