ok now i want to scream at it..........
Code:
buffer Var Byte[16]
cnt Var Byte
flash var byte
LED0 Var PORTB.0
LED1 Var PORTB.1
LED2 Var PORTB.2
LED3 Var PORTB.3
LED4 Var PORTB.4
CMCON = 7 ; turn off comparators
ADCON1 = 15 ; turn off analog inputs
define OSC 48
trisa=0
trisb=0
high led0
high led1
high led2
high led3
high led4
pause (1000)
low led4
pause (1000)
low led3
pause (1000)
low led2
pause (1000)
low led1
pause (1000)
low led0
pause (1000) ; end of the pretty countdown
portb=9
pause 1000
; usbinit
portb=8
pause 1000 ; never gets to here if i un-rem usbinit
portb=16
; Wait for USB input
idleloop:
; USBService ' Must service USB regularly
; cnt = 16 ' Specify input buffer size
if flash=0 then
portb=1
flash=1
else
portb=0
flash=0
endif
;
; USBIn 3, buffer, cnt, idleloop
pause 1250
goto idleloop
with the usb bits rem'd out, the led's flash as expected, as soon as i un=rem usbinit, it hangs at usbinit
Bookmarks