I use PIC18F458 with 20MHZ clock.
I set TMR0L = 00 and I wait = FF. I increment it with clock (I think internal /4) and 1/256(prescale). What is it the time duration between
00 to FF ?
Thanks
if portd.2=1 then
low portd.2
else
high portd.2
endif
resume
enabled
1) 18F458 has 2 interrupt address 0080H and 0018H
the on interrupt goto xxx use 08H or 18H
2) I wait on portd.2 one signal 3.3 sec high and 3.3 sec low but this aspected signal there isn't
I see the high level very speed and the low level large and the period isn't regular
hi gzorzi,
I’m not familiar with picbasic pro but:
1) for high and low priority interrupts handling you have to see picbasic manual.
2) what is the value of IPEN bit in RCON register ?
3) there is no need to disable, reset and reenable TMR0 in interrupt handling routine;
4) use LATD rather PORTD register to toggle PORTD2 bit i.e. -> if latd.2=1 then …