Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
In below code i have stored the sensed current in variable I_a,I_b in array form , I trying to show this waveform on the DAC (pin 18,analog out),but i did not get any waveform on the pin18. i can not understand why the pin 18 not showed any output. is this due to the limited RAM of the Mbed controller? if i want to see the array variables on the Pin 18 then, i need to use any other instruction to do this things.
#include"math.h" #include"mbed.h" AnalogIn Ia(p19); AnalogIn Ib(p20); DigitalOut led1(LED1); AnalogOut Aout(p18); Timer t; main() {double I_a[5],I_b[5],I_c[5],Ibeta[5],x=0.5774; while(1) { for(i=0;i<5;i++) { t.start(); I_a[i]=Ia*66; I_b[i]=Ib*66; I_c= -(I_a+I_b); Ibeta[i] = (x*I_a[i])+(2*x*I_b[i]); led1=1; Aout = Ibeta[i]/66; t.stop(); t.read(); }} }