uranyumx
Advanced Member level 4
Hello,
I collected a certain number of frequency values in an array (temp). In another array(tempPeriod), I want to store the period equivalents of each frequency values of temp array in microseconds. For example, the idea should be tempPeriod = (1000000*(1/temp)); But I got zero from tempPeriod result.
Do you have any suggestions?
Thank you,
I collected a certain number of frequency values in an array (temp). In another array(tempPeriod), I want to store the period equivalents of each frequency values of temp array in microseconds. For example, the idea should be tempPeriod = (1000000*(1/temp)); But I got zero from tempPeriod result.
Do you have any suggestions?
Thank you,
Code:
uint32_t temp [100];
uint32_t tempPeriod [100];
uint16_t fMinModulation = 0;
uint16_t fDeltaModulation = 0;
for (int i = 0; i < numofpulse; i++)
temp[i] = fMinModulation + (i*fDeltaModulation);
tempPeriod[i] = (1000000*(1/temp[i]));