- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Regarding ADC of PMG1-B1, there is the following description in Datasheet of PMG1-B1.
<Peripherals and GPIOs>
• 2x 8-bit ADCs
• 1x 12-bit ADC
Q)From the above, it is recognized that only three GPIOs with ADC functions can be used, But, Is it possible to use five ADC functions of the attached GPIO at the same time? If possible, please tell me how to set
Best Regards
Solved! Go to Solution.
- Labels:
-
USB EZ-PD Type-C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please refer to battery_measure.c file in the PMG1-B1 Source Code.
get_adc_8bit() is the function to use 8bit SAR ADC. You need to provide port and pin information to this function to get the conversion.
To use 12 bit SAR ADC, the pins you had specified in your initial post can directly be used. 12 Bit ADC has total of 8 channels, please refer to Device Configurator. In Device Configurator you can find the ADC configuration, number of channels and other details. Please configure the same as per requirement. You can also refer to same battery_measure.c for usage of this ADC as well.
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It is definitely possible to measure 5 voltages using the different GPIOs one after the other. May I know if you want to measure 5 cell voltages for cell monitoring or if you require this for general-purpose measurement? Based on your response I can suggest you the configuration.
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Thank you for your reply.
Configuration is below.
1. Voltage monitor x1
2. Temperature moniter x3
3. Other: Communication
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please refer to battery_measure.c file in the PMG1-B1 Source Code.
get_adc_8bit() is the function to use 8bit SAR ADC. You need to provide port and pin information to this function to get the conversion.
To use 12 bit SAR ADC, the pins you had specified in your initial post can directly be used. 12 Bit ADC has total of 8 channels, please refer to Device Configurator. In Device Configurator you can find the ADC configuration, number of channels and other details. Please configure the same as per requirement. You can also refer to same battery_measure.c for usage of this ADC as well.
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Thank you for your reply.
Could not find ”battery_measure.c”. Please tell me the direct reference link on the web
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Currently, the PMG1-B1 project is not released on the web. Please let me know the project are you using.
Pranava