On 1/20/07, Francisco Zabala wrote: > Hi all, > > I put the following code into the 16F88, and I can no longer access it > via my USB Board (HP488). Suggestions? The program made all the LEDs > on the board light up (which is exactly what I was trying to do, but > now I must figure out how to undo it :) ) > > Thanks. > > list p=16f88 ; list directive to define processor > #include ; processor specific variable definitions > errorlevel -302 ; suppress message 302 from list file > > __CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & > _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & > _PWRTE_OFF & _WDT_OFF & _HS_OSC > > CBLOCK 0x20 ; Declare variable addresses starting at 0x20 > Loop1,Loop2 > ENDC > > org 0 > > BANKSEL PORTB ; select bank of PORTB > CLRF PORTB ; clearing output data latches to initialize > (analog on restart for PORTA) > BANKSEL ANSEL ; Select Bank of ANSEL > MOVLW 0x00 ; Configure all pins as digital inputs > MOVWF ANSEL ; as digital inputs > MOVLW 0x00 ; Value used to initialize data direction > MOVWF TRISB ; Set RB<7:0> as outputs > BANKSEL PORTB > > Loop > MOVLW 0xFF > MOVWF PORTA > MOVWF PORTB > NOP > NOP > CALL Delay > MOVLW H'00' > MOVWF PORTA > MOVWF PORTB > CALL Delay > GOTO Loop > > Delay > MOVLW D'63' > MOVWF Loop1 > Outer > MOVLW D'63' > MOVWF Loop2 > Inner > NOP > NOP > DECFSZ Loop2,F > GOTO Inner ; Inner loop = 5 usec. > DECFSZ Loop1,F > GOTO Outer > RETURN > > end > > > - Cisco > -Cisco > Sorry to bother you all, bit 3 in port A had to be pulled low. Thanks, -Cisco -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist