PIC16F1825 Bug in OSCCON?

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
DirkB
Posts: 58
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:55 pm
Been thanked: 4 times

PIC16F1825 Bug in OSCCON?

Post by DirkB »

I don't know how the old post ended up in the general section.
So here again in the right section.

Hello Ben,

the oscillator runs at 32 Mhz. The PIC requires 4 clocks for 1 execution.
It therefore runs at 8 mips and you must not divide the number of steps
by four. The Speedtest programme should then give a frequency of 2 Mhz
and not 500 Khz. It looks to me as if the oscillator is working without
4 x PLL. These 500 Khz are not conclusive for me. Can you please check
this? I always measure with an oscilloscope and frequency meter at the
pin of the chip. I have looked at the assembler code. I don't know assembler
or C. Then I wouldn't need flowcode ;o) In the assembler code, the pins
are configured globally as input and output. Each pin is set to input
by default at start or reset. I have configured all the pins as I need
them. When outputting to the pin, this pin does not need to be set as
an output, as it is already an output. I derived a C code from the assembler
code and was able to achieve a speed increase of 100 %. Nevertheless, it
still runs below 1 Mhz. Perhaps the outputs of Flowcode should be adapted.
Either with Tris or without Tris. This is not needed for an input as it is
already an input.
Compare SpeedCheck3 with SpeedCheck4. They are identical. In SpeedCheck4,
however, the pins are configured with C code and the output is only with LAT.

Thank you very much

Dirk
Attachments
SpeedCheck4.fcfx
(10.69 KiB) Downloaded 480 times
SpeedCheck3.fcfx
(10.32 KiB) Downloaded 489 times

Post Reply