Re: TIMER0 Problem
|
||||
---|---|---|---|---|
版主
|
The program should be work once for the 100ms delay with the 16-bit Timer0. I don't know that why can't not work well in the MPLAB v6.6, Could you please load it into the MPLAB-SIM to simulate your code and view the Timer status/value.
For the 100ms delay, I will suggest you to use interrupt of the Timer0 that will be more efficiently and easily.
發表於: 2004/8/12 14:07
|
|||
|
TIMER0 Problem
|
||||
---|---|---|---|---|
新會員
|
I wonder why. The program I wrote to create 100ms delay was working properly with ICD2 plugged in. Recently, I installed MPLAB v6.6, and same program is not working anymore with ICD2 plugged in. Thanks for any comments.
MCU: PIC18F8680 DELAY_100MS ................movlw 0xFD ................movwf TMR0H ................movlw 0xA0 ................movwf TMR0L ................movlw 0x85 ................movwf T0CON ................bcf INTCON,TMR0IF ................btfss INTCON,TMR0IF ................goto $-2 ................movlw 0x00 ................movwf T0CON ................return
發表於: 2004/8/10 15:22
|
|||
|