Can't write byte to port?
adelle
Posts: 2
NOTE: PROBLEM RESOLVED.
This doesn't make sense? (Experienced 30+yr embedded C programmer)
The following trimmed down code will not work, that is make pin 3 HIGH and just stop (hang).
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM1}
START:
DIRL= %00001111 'first port
DIRH= %11111111 'second port
OUTA = $8
GOTO MAIN
MAIN:
GOTO MAIN
This crappy code does work but I need to send a nibble VARIABLE to the lower port: What am I doing wrong
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM1}
START:
LOW 0
LOW 1
LOW 2
HIGH 3
GOTO MAIN
MAIN:
GOTO MAIN
This doesn't make sense? (Experienced 30+yr embedded C programmer)
The following trimmed down code will not work, that is make pin 3 HIGH and just stop (hang).
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM1}
START:
DIRL= %00001111 'first port
DIRH= %11111111 'second port
OUTA = $8
GOTO MAIN
MAIN:
GOTO MAIN
This crappy code does work but I need to send a nibble VARIABLE to the lower port: What am I doing wrong
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM1}
START:
LOW 0
LOW 1
LOW 2
HIGH 3
GOTO MAIN
MAIN:
GOTO MAIN
Comments
What do you do in Hollywood? I work there too.
Last time I checked our intrepid commentator was the means behind movie (and TV) making.
Jon, our correspondent, wrote a PBASIC program to do that, is what you've posted a SPIN or PASM example?
(And what in the world is that out of a movie monster doing you watching work?)
-- https://www.pinterest.com/jonmcphalen/techno-art/
I have in fact written prop control code for FX artists with the BASIC Stamp, the SX, and since about 2008 I have focused on the Propeller.