Not applicable
Dec 01, 2015
02:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 01, 2015
02:01 PM
I am new to Dave and Micro controllers, so forgive me if this is a dumb question. I am working with Dave3 (I know its not up to date but it is necessary for my project) and I am attempting to store an ADC value converted from an external
potentiometer into a variable such as "ADC_Result" in the MCU's C code. I have been working with the examples written by infineon, however they all seem to store the results in a variable that can only be accessed via the debug mode, and I need my variable to be accessible dynamically within the code, such that it may be used to change the frequency of an LED for example.
Let me know if you need screenshots of the code or APPs setup.
Thanks
potentiometer into a variable such as "ADC_Result" in the MCU's C code. I have been working with the examples written by infineon, however they all seem to store the results in a variable that can only be accessed via the debug mode, and I need my variable to be accessible dynamically within the code, such that it may be used to change the frequency of an LED for example.
Let me know if you need screenshots of the code or APPs setup.
Thanks
1 Reply
Dec 02, 2015
06:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 02, 2015
06:40 PM
Hi,
It's never a dumb question here... everyone is learning n teaching one another.
First of all can you please upgrade your DAVE3 to DAVE4. Then use the below low level example as a start to understand the VADC.
http://www.infineonforums.com/threads/3373-XMC4000_HOT-How-to-do-VADC-Queue-source-synchronous-conve...
" however they all seem to store the results in a variable that can only be accessed via the debug mode, and I need my variable to be accessible dynamically within the code, such that it may be used to change the frequency of an LED for example."
The debugger is meant for you to monitor the variables and trace your software logic. You can make use of the VADC_Result variable to change the frequency of LED.
This is just an example:
if (Previous < VADC_Result)
{
// Increase LED Freq
}
else if (Previous > VADC_Result)
{
// Decrease LED Freq
}
Previous = VADC_Result;
It's never a dumb question here... everyone is learning n teaching one another.
First of all can you please upgrade your DAVE3 to DAVE4. Then use the below low level example as a start to understand the VADC.
http://www.infineonforums.com/threads/3373-XMC4000_HOT-How-to-do-VADC-Queue-source-synchronous-conve...
" however they all seem to store the results in a variable that can only be accessed via the debug mode, and I need my variable to be accessible dynamically within the code, such that it may be used to change the frequency of an LED for example."
The debugger is meant for you to monitor the variables and trace your software logic. You can make use of the VADC_Result variable to change the frequency of LED.
This is just an example:
if (Previous < VADC_Result)
{
// Increase LED Freq
}
else if (Previous > VADC_Result)
{
// Decrease LED Freq
}
Previous = VADC_Result;