Bug in 16F1454.fcdx

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Bug in 16F1454.fcdx

Post 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
Attachments
Test-Generator.fcfx
(11.65 KiB) Downloaded 189 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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.

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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
Attachments
Test-Generator-2.fcfx
(11.65 KiB) Downloaded 197 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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.

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Bug in 16F1454.fcdx

Post by DirkB »

Hi Ben,

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

regards

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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.
Attachments
Test-Generator-LED.fcfx
(12.86 KiB) Downloaded 196 times

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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.

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Bug in 16F1454.fcdx

Post 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

Post Reply