1 out of 1 members found this post helpful.
Did you find this post helpful?

|
Re: 18F series performance not so good?
On the 16F series, outputs frequency that of 1/4 of OSC speed- say osc is 8mhz, output will be 2mhz and so on (and contrary some recomendations, replacing HIGH/LOW with LATB=X or TRISB=X does not improve the speed).
Not in my world a pic @8mhz [12,16 or 18] would get nowhere near that
GKO:
HIGH PORTc.7
LOW PORTc.7
GOTO GKO
TRANSLATES TO 5 LOOP instructions no matter whether its pic16 or pic18
GKO
BCF PORTC 7 1CYC
BCF PORTC+12H 7 1CYC
BSF PORTC 7 1CYC
BCF PORTC+12H 7 1CYC
BRA GKO 2CYC
AS IOANNIS states around 380ns or 2.66MHz @64MHZ
GKO:
LATC.7 = 0
LATC.7 = 1
GOTO GKO
TRANSLATES TO 3 LOOP instructions no matter whether its pic16 or pic18
GKO
BCF LATC 7 1CYC
BSF LATC 7 1CYC
BRA GKO 2CYC
around 250ns or 4MHz @64MHZ
DITTO FOR
LATC.7 = 0
GKO:
TRISC.7 = 0
TRISC.7 = 1
GOTO GKO
TRANSLATES TO 3 LOOP instructions no matter whether its pic16 or pic18
GKO
BCF TRISC 7 1CYC
BSF TRISC 7 1CYC
BRA GKO 2CYC
around 250ns or 4MHz @64MHZ
Warning I'm not a teacher
Bookmarks