2024-07-31 02:42 AM
if i have
int angka_test = 10;
int a;
while (1) {
output = output_start + ((output_end - output_start) * (angka_test - input_start)) / (input_end - input_start);
a = angka_test;
__HAL_TIM_SET_AUTORELOAD(&htim2, output); }
why 'a' if i seee form watch is 0, but angka_test=100, help me
Solved! Go to Solution.
2024-07-31 02:51 AM
Please see the posting tips for how to properly post source code:
It should look something like this:
int angka_test = 10;
int a;
while (1) {
output = output_start + ((output_end - output_start) * (angka_test - input_start)) / (input_end - input_start);
a = angka_test;
__HAL_TIM_SET_AUTORELOAD(&htim2, output);
}
@meriarajagukguk wrote:why 'a' if i see from watch is 0, but angka_test=100, help me
Perhaps provide a screenshot of how you're seeing this, and a detailed description of how you get there?
Note that Keil is a 3rd-party products - nothing to do with ST - so you really need to be asking Keil about specific issues with their tool:
https://community.arm.com/support-forums/f/keil-forum
Two things to note:
2024-07-31 02:51 AM
Please see the posting tips for how to properly post source code:
It should look something like this:
int angka_test = 10;
int a;
while (1) {
output = output_start + ((output_end - output_start) * (angka_test - input_start)) / (input_end - input_start);
a = angka_test;
__HAL_TIM_SET_AUTORELOAD(&htim2, output);
}
@meriarajagukguk wrote:why 'a' if i see from watch is 0, but angka_test=100, help me
Perhaps provide a screenshot of how you're seeing this, and a detailed description of how you get there?
Note that Keil is a 3rd-party products - nothing to do with ST - so you really need to be asking Keil about specific issues with their tool:
https://community.arm.com/support-forums/f/keil-forum
Two things to note:
2024-08-01 01:51 AM
big thanks to your help