O.K. i don't know if i can explain it as you wish but...
When you do your program, you need to use some variable. Depending how you work you may need 3 different type of them
BIT
BYTE
WORD
Bit is only 2 conditions: 1 or 0 : usually to test bit or set test flag
BYTE : 256 condition or items
WORD : 65536 conditions or items
By using LED VAR BYTE, you are able to store/read 256 different items to it. BYTE = 8 bits
LED is the name of the variable BYTE is it's size.
Code:
TRISB = 0 'Set PORTB as output on all pins
LED VAR BYTE
start:
FOR LED = 0 TO 255
PORTB=LED ' send content of LED var to PORTB
PAUSE 500 ' wait .5 sec
NEXT B
GOTO Start ' redo the loop
hope this help
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks