Microchip DSPIC blockset ADC reading issues

1 回表示 (過去 30 日間)
Gary
Gary 2018 年 3 月 25 日
Hi I am using the Version 3.37 of microchip blockset and was trying to simultaneously read two channels (AN0 and AN1 ) and take its ratio. If I read DC with equal magnitude, the ratio read is 1 , but when I connected a low frequency AC signals, the ratio fluctuates between 0 and 1. Why and where from zero appears is not clear. Help will be greatly appreciated.
The custom C code is given below
#include<stdio.h>
void uart(unsigned int a , unsigned int b) { if(b/a==0) { printf("ratio is zero\n"); } }

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with DSP System Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by