Page 2 of 2

Re: PWM Woes

Posted: Tue May 13, 2025 2:14 pm
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

Re: PWM Woes

Posted: Tue May 13, 2025 2:20 pm
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.

Re: PWM Woes

Posted: Tue May 13, 2025 7:11 pm
by alanwms
Perfect - Thank you M.

Re: PWM Woes

Posted: Wed May 14, 2025 7:31 pm
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.

Re: PWM Woes

Posted: Wed May 14, 2025 7:51 pm
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

Re: PWM Woes

Posted: Wed May 14, 2025 9:35 pm
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.

Re: PWM Woes

Posted: Wed May 14, 2025 9:54 pm
by chipfryer27
Hi

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

Regards