Hi
I am trying to run a PIC18F14K22 in PLL mode with internal oscillator and PLL (i.e. frequency x 4). The internal clock should be 64'000'000 MHz. Here is my sample code:
This peace of code is assumed to deliver 3 pulses again and again. I got on my scope 3 pulses at 4.20 us duration and I was expecting about 15 ns each pulse duraton since the BSF and BCF instructions last one clock cycle and that cycle should last about 15 ns.Code:asm __CONFIG _CONFIG1H, _FOSC_IRC_1H & _PLLEN_ON_1H & _PCLKEN_ON_1H & _FCMEN_ON_1H & _IESO_ON_1H __CONFIG _CONFIG2L, _BOREN_OFF_2L __CONFIG _CONFIG2H, _WDTEN_OFF_2H & _WDTPS_128_2H __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_ON_4L & _XINST_OFF_4L __CONFIG _CONFIG7L, _EBTR0_ON_7L endasm TRISA = 0 main: asm BSF PORTA, 0 BCF PORTA, 0 BSF PORTA, 0 BCF PORTA, 0 BSF PORTA, 0 BCF PORTA, 0 endasm goto main end
See annexed image for result details on scope.
Any advice to me?
Many thanks in advance.





Bookmarks