a little MPSIM ( MPLAB ) simulation - supposed to be relatively true - gives à 3.2µs half -cycle to your test ... around 160 khz output frequency !
BTW ... I'm not sure the DEFINE OSC 48 and a 20 Mhz Xtal to be a good combination ...
best result @ 1.8µs half cycle given byinstead of TOGGLE + PAUSEUS1Code:Portb.1 = ! Portb.1






Bookmarks