PIC24HJ128GP210A-I/PT controllers issue

General discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
sr_viss
Posts: 1
Joined: 22 Dec 2023 05:00

PIC24HJ128GP210A-I/PT controllers issue

#1 Post by sr_viss » 17 Jan 2024 09:45

Hi!
We have discovered very strange function on PIC24HJ128GP210A-I/PT controllers.

PortB is configured as digital input
PortE is configured as analog input

If there is digital signal present on PortB pin RB0, then AD conversion data from PortE is "slightly" corrupted on every other conversion result. AD data seems to follow analog signal, but you have slightly higher values on every other conversion results. It sort of works, but it does not.

If we remove digital input signal from PortB pin RB0, then AD conversion on PortE works perfectly.
We have now left RB0 pin unconnected and that has fixed our problem, but it would be nice to know what could cause this kind of behavior.

PortE AD was read with both DMA and polling methods, there was no difference how you read the AD data, half of the data was "slightly" corrupted every time when PortB RB0 had digital signal present (encoder in our system)
AD port has external references on PortA.

Best Regards

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: PIC24HJ128GP210A-I/PT controllers issue

#2 Post by IvanJeremic » 17 Jan 2024 13:15

Hi,

I don't see any specific reason why this would happen, it could be that you did not set the RB0 pin correctly, or something similar.
https://ww1.microchip.com/downloads/aem ... 80468G.pdf
https://ww1.microchip.com/downloads/aem ... 70592d.pdf

Thank you for sharing this issue with the MikroE community.

Regards,

Ivan.

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 General”