Hello Martarse,
M>>Anyways, I've make some test on my side.
high portb.0 '0001
pause duree
low portb.0 '0010
high portb.1
pause duree
high portb.0 '0011
pause duree
low portb.0 '0100
low portb.1
high portb.2
pause duree
...
... until '1111
I want to optimize this code because it uses many many space.
<<
Try the following: this simplified your code to count to 15 using your first 4 bits. If you want to go higher, remove the for-next loop. and let it "recycle" itself.
TRISB=%00000000
counter var byte
Portb=0;
Loop:
for counter=0 to 7 step 1
Portb=Portb+1
Next counter
Portb=0
goto Loop
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks