OK... looking at the PBC manual... here's the conversion... sombody can correct me if I've made a mistake...
Code:
' LEDA is on PortB.0
' LEDB is on PortB.1
' LEDC is on PortB.2
' LEDD is on PortB.3
' RandomValue is variable W0
' LEDValue is variable B2
Start:
Low 0
Low 1
Low 2
Low 3
Random W0
B2=W0 & $03
If B2=0 then High 0
If B2=1 then High 1
If B2=2 then High 2
If B2=3 then High 3
Pause 1000
Goto Start
Well, actually, you could probably reduce it further...
Code:
Start:
Low 0
Low 1
Low 2
Low 3
Random W0
B2=W0 & $03
High B2
Pause 1000
Goto Start
Bookmarks