Hi All,
I want to set divider ratio of s12zvl macro pin no 2 PL0/Hvi to 1:9.
I tried by setting PIRL_PIRL0 bits but not getting 1:9 ratio.
Requesting assistance.
Have a nice day !
Thanks & Regards,
Charudatta
Hi Charudatta,
I am afraid that this is just misunderstanding.
Ratio 1:9 could be set for VSUP measurement.
HVI input ratio could be set as RatioL_HVI (=1:2) or RatioH_HVI (=1:6) by PIRL_PIRL0 bit.
Additionally you have to also route divider to ADC by PTAD_PTAENL=1.
For example: PTAL = 0x08; //HVI0 connected to ADC.
Optionally you could also bypass voltage divider and connect HVI input directly to ADC by PTAD_PTADIRL=1 (valid only when PTAD_PTAENL=1).
For example: PTAL = 0x18; //HVI0 connected to ADC, bypass divider.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------