PIC16FV32K303

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

PIC16FV32K303

Post by DirkB »

Hello,

Is it correct that the chip PIC24FV32K302 has no port interrupt
falling Edge, only both, rising and falling edge ?

thanks

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: PIC16FV32K303

Post by Benj »

Hi Dirk,

Yes it looks that way looking at the datasheet. You can do rising or falling detection in software by monitoring the pin states.

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

Re: PIC16FV32K303

Post by DirkB »

Hi Ben,

found it. This chip has 3 pins set for this task. This pins are Int0 pin 16,
Int1 pin 25 and Int2 pin 20 (24Fxx) or pin 23 (24FVxx).

regards

Dirk

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Dirk, Hi Ben

I have a problem in my hardware with a interrupt and a Pic32MZ2048ecg and Pic32MZ2048efg
as similar as here is the question.

I had a look in the datasheet from the PIC24FV32
and it look as the PIC has Edge Detect Polarity.
Also my PIC's have this bit.
But how can we use that with FC8 ? Maybe just change a bit in a register?

regards
Stefan
bit 2 INT2EP: External Interrupt 2 Edge Detect Polarity Select bit
1 = Interrupt is on the negative edge
0 = Interrupt is on the positive edge
bit 1 INT1EP: External Interrupt 1 Edge Detect Polarity Select bit
1 = Interrupt is on the negative edge
0 = Interrupt is on the positive edge
bit 0 INT0EP: External Interrupt 0 Edge Detect Polarity Select bit
1 = Interrupt is on the negative edge
0 = Interrupt is on the positive edge
http://ww1.microchip.com/downloads/en/D ... 09995e.pdf

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

Re: PIC16FV32K303

Post by DirkB »

Hi Stefan (Stefan deutsch? ;o),

use the INT Icon in Flowchart, double klick on it and you will see.

regards

Dirk

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Dirk
(Ja, wir sprechen deutsch in der Schweiz)

Your Pic looks good for the INT, only my Pic is a litle different.
For you it's clear how to use INT with B7,B14,B12 but the PIC32MZ2048EFG100
is not clear how to use, because four out of five external interrupts are remappable.
The Int0, I found is on Pin71 on D0
Do you have an idea how to use the anothers?
I need one interrupt on C3....

regards
Stefan

int_pic24fv304.jpg
int_pic24fv304.jpg (41.37 KiB) Viewed 6237 times
int_pic32MZ2048efg.jpg
int_pic32MZ2048efg.jpg (51.8 KiB) Viewed 6237 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Dirk, Hi Ben

It looks as if I need INT2 for Pin C3

regards

Stefan

External_Interrupt2.PNG
(59.64 KiB) Downloaded 1980 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: PIC32MZ2048EFG100 Remap INT

Post by Benj »

Hello Stefan,

If you go into the interrupt properties then it should allow you to assign the remap pin.

Do you need the interrupt to simulate? Currently the simulation pin is fixed but the downloaded pin can be remapped.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Ben


Perfect.
A little my mistake. I only looked at the INT0 and this is fixed and not remappel
In the Int2 is a nice menue for choosing the pins. I like the FC8...
Int2.PNG
(19.44 KiB) Downloaded 1976 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Ben

I have changed my program to the INT2 on PIN C3.
The result is not ok. If I check the signal on PIN3 there is always a low signal.

When I change it back to Interrupt on port C and choose C3 then signal on PIN C3 is toggeling.
As if the configuration from INT2 on Pin C3 set the input always to low....
This is on the PIC32MZ2048ECG100

Did I do something wrong?

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: PIC16FV32K303

Post by Benj »

Hi Stefan,

Please can you post your program so we can have a look for you.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Ben

So I changed my program a little. If I select the Portc and PIN C3, my program is running.
If I select the INT2 on PIN C3 it's not working.
For both Interruppt, I checked the signal on Pin C3 (input) with the osciloscope and there is always a signal toggeling to flash thr INT .....

To select the INT on one place
INT-choose.PNG
(17.15 KiB) Downloaded 1940 times
To show the flashing INT I turn on and off a green LED
int_rutin.PNG
(84.06 KiB) Downloaded 1940 times
Fc8_ecg100_emg_ekg_icd4_v1.fcfx
(415.17 KiB) Downloaded 218 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times

Re: PIC16FV32K303

Post by stefan.erni »

Hi Ben

How is the litle Interrupt problem with PIC32MZ2048EFG100 ?

For my project " Low-Noise, 6-Channel, 24-Bit Analog-to-Digital Converter for Biopotential Measurements "

(reading ADS1299 chip) it's a big help if the Interrupt is working fine.

Post Reply