I have loaded the program as indicated .
No errors displayed.
I am using pbp 2.50, picf184523 @ 40 MHz speed.
I have a square wave output at porta.4 and 100 msec period ( 50 msec high and 50 msec low ).
Where does the 100 msec come from ?
How could I set different periods ?
The program is attached here.
Thanks
Ambrogio
'HSPLL OSCILLATOR HAS BEEN DEFINED IN THE PBP FOLDER > 18F4523 FILE
DEFINE OSC 40
LED1 VAR PORTA.4
INCLUDE "DT_INTS-18.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
T1CON = $31 ; Prescaler = 8, TMR1ON
@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts
Main:
PAUSE 1
GOTO Main
'---[TMR1 - interrupt handler]--------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
Bookmarks