Page 1 of 1

Bug in 16F1454.fcdx

Posted: Wed Apr 17, 2019 9:45 am
by DirkB
Hello,

the component for the PIC16F1454 doesn't work. It is not possible to
activate analog inputs. It is also not possible to activate a timer with a higher
speed than 170 KHz. For my project I need a timer with 450KHz or higher and
analog input.

regards

Dirk

Re: Bug in 16F1454.fcdx

Posted: Wed Apr 17, 2019 9:57 am
by Benj
Hello Dirk,

The 16F1454 does not have an ADC peripheral.

In your attached program the interrupt rate is set to 600Khz? This may simply be too fast and hence you are in the interrupt macro when the next interrupt fires and so you miss that one and then have to wait for the counter to wrap around again giving you a much lower interrupt frequency. Try backing off the interrupt frequency a bit until it works properly or try to remove some of the code from the interrupt macro.

Re: Bug in 16F1454.fcdx

Posted: Wed Apr 17, 2019 10:48 am
by DirkB
Hi Ben,

yeah, sorry, I just modified it for testing. here the original program. timer with frequency of
450KHz should be possible with a clock rate of 12MHz or i am wrong? Is there another possibility?
The timer rate must be divisible by three.

thanks

Dirk

Re: Bug in 16F1454.fcdx

Posted: Wed Apr 17, 2019 11:46 am
by Benj
Hi Dirk,

Have you done a 1 second flasher test to confirm the chip is running at the speed you think it is.
https://www.matrixtsl.com/wiki/index.ph ... ED_flasher

The PLL may need to be enabled in the configuration settings.

Re: Bug in 16F1454.fcdx

Posted: Wed Apr 17, 2019 12:14 pm
by DirkB
Hi Ben,

i have enabled clock output and messure 11.97 Mhz on this pin

regards

Re: Bug in 16F1454.fcdx

Posted: Wed Apr 17, 2019 12:55 pm
by DirkB
Hi Ben,

mh, the LED seems is blinking at 2 Hz. The fastest Speed
of the chip is 12MHz without PLL, or am i wrong?

Dirk

(Edit)

I have a look to the data sheet. It is 16MHz clock,
with 3xPLL it can then be divided by three.

Re: Bug in 16F1454.fcdx

Posted: Thu Apr 18, 2019 8:47 am
by DirkB
Hello Ben,

who can read has the advantage. according to the data sheet the PIC16F1454 and the PIC16F1455
are identical, but the PIC16F1454 has no analog Inputs and Outputs and no CWG. I wonder why
there are two different chips? If you don't need it don't use it.

regards

Dirk

Re: Bug in 16F1454.fcdx

Posted: Sun Apr 21, 2019 8:37 am
by DirkB
Hello Ben,

the analog in- and outputs of the pic16f1454 is not a bug. If using a port interrupt always the results in a reset. The osc-helper should also be checked. The timing is wrong, so a correct baud rate is not possible.

regards

Dirk

Re: Bug in 16F1454.fcdx

Posted: Tue Apr 23, 2019 10:04 am
by Benj
Hello,
I wonder why there are two different chips? If you don't need it don't use it.
Microchip sells their chips by the millions, to large customers even a saving of a fraction of a penny may add up to thousands of pounds if the unit count is high enough. Hence the need for lots and lots of chips with very slight feature differences.

Let me investigate the port interrupt and timing bugs for you and see if I can work out the problem here.

Re: Bug in 16F1454.fcdx

Posted: Tue Apr 23, 2019 5:59 pm
by DirkB
Hi Ben,

I knew that of course and I was just (about me) annoyed because I didn't see it myself immediately ;0)

thanks

Dirk