Practical SXB Book Code Problems
I have been playing around trying to learn more of the code for the SX and have run across a snag in the Practical SX Book. I have typed this code in but I get nothing. I tried searching the forum because I had read at one time there was some typos in Jon's book. So I wanted to see if I was doing something wrong or there was an error.
Thanks,
Kevin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
' ------------------------------------------------------------------------- ' Program Description ' ------------------------------------------------------------------------- Led Blinky 3 ' ------------------------------------------------------------------------- ' Device Settings ' ------------------------------------------------------------------------- DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX FREQ 4_000_000 ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- Led Pin RB.0 ' ------------------------------------------------------------------------- ' Constants ' ------------------------------------------------------------------------- IsOn Con 1 IsOff Con 0 ' ------------------------------------------------------------------------- ' Variables ' ------------------------------------------------------------------------- ' ========================================================================= PROGRAM Start ' ========================================================================= Start: Do Led = IsOn Pause 500 Led = IsOff Pause 500 Loop
Thanks,
Kevin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
One thing that I don't see in your code is where you define the pin as an output. If it
isn't defined as one you won't see any change in the LED.
Robert
Thanks Guys,
Kevin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔