MIIP, there's something weird... if i use a 16F877 and this....
Code:
DEFINE OSC 20
DEFINE LOADER_USED 1
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 129 ' 9600 Baud @ 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
pauseus 0
TRISB.0 = 0
PORTB = 0
start:
asm
CHK?RP PORTB
local a=0
while a<16
BSF PORTB,0
nop
PAUSEUS?C 12
BCF PORTB,0
nop
PAUSEUS?C 12
a+=1
endw
endasm
pause 100
goto start
it compile 207 Word
if i use...
Code:
DEFINE OSC 20
DEFINE LOADER_USED 1
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 129 ' 9600 Baud @ 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
pauseus 0
TRISB.0 = 0
PORTB = 0
start:
' #1
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #2
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #3
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #4
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #5
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #6
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #7
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #8
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #9
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #10
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #11
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #12
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #13
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #14
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #15
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
' #16
PORTB.0 = 1
@ nop
Pauseus 12
PORTB.0 = 0
@ nop
PAUSEUS 12
pause 100
goto start
Still 207 words...
EDIT: OK DUDE we hit the button at the same time or...so.
Bookmarks