PWM Woes

For general Flowcode discussion that does not belong in the other sections.
chipfryer27
Valued Contributor
Posts: 1543
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 352 times
Been thanked: 551 times

Re: PWM Woes

Post by chipfryer27 »

Hi Martin

Just had a look and now see your reply. I'm sure you are aware, it appears to affect the data recorder as well as scope.

Regards

medelec35
Matrix Staff
Posts: 1950
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 624 times
Been thanked: 656 times

Re: PWM Woes

Post by medelec35 »

Thanks Iain.
Yes, as I believe it's the same API that controls both.
However it looks like it will take up too much processing power.
Therefore we will be leaving it at as it is.
Sorry for any inconvenience.
Martin

alanwms
Posts: 144
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 26 times
Been thanked: 7 times

Re: PWM Woes

Post by alanwms »

Perfect - Thank you M.

alanwms
Posts: 144
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 26 times
Been thanked: 7 times

Re: PWM Woes

Post by alanwms »

Side note - The hardware actually performs the PWM. Side note 2 - Selection of the INTO pin seems not to apply just to the pin. Seems that all pins (IOC) are involved. Regardless of which pins are activated, the interrupt macro runs.

chipfryer27
Valued Contributor
Posts: 1543
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 352 times
Been thanked: 551 times

Re: PWM Woes

Post by chipfryer27 »

Hi

Depending on chip (I don't have datasheet to hand), IOC can operate on individually selected pins, a group of pins or a port. If a group or port then any pin change within that group calls the IOC routine. Therefore in your routine you first need to establish which pin in the group caused the interrupt then act upon that.

Many older PICs had IOC only on a few pins on Port B. Any one of those pins having a change of value would trigger the interupt. In the interupt routine you had to test to see which pin had changed and act accordingly.

Regards

alanwms
Posts: 144
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 26 times
Been thanked: 7 times

Re: PWM Woes

Post by alanwms »

I see -Thanks Chip!
The selections in the interrupt component differentiate between IOC and Int0 so I think that selecting int0 should give me the individual action. However, selecting int0 allows all portA pins to run the interrupt macro. I suspect that FC sees no difference. Maybe it's flipped and IOC is really int0? I will check that out.

chipfryer27
Valued Contributor
Posts: 1543
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 352 times
Been thanked: 551 times

Re: PWM Woes

Post by chipfryer27 »

Hi

If I get a chance I'll grab the datasheet.

Regards

Post Reply