
leoncito :3
Diff: main.cpp
- Revision:
- 1:69c0846f5b77
- Parent:
- 0:cf938939cb77
--- a/main.cpp Fri Oct 13 09:40:21 2017 +0000 +++ b/main.cpp Thu Nov 29 03:05:10 2018 +0000 @@ -6,8 +6,8 @@ //MBED Class Instances follows DigitalOut SampLED(LED1); //Digital Output (GREEN LED is PB_3, D13 You can use an Oscilloscope on This pin to confirm sample rate) -AnalogIn Ain(PA_1); //Analog Input (Signal Input 0 to +3 Volts) -AnalogOut Aout(PA_4); //Analog Output (Signal Input 0 to +3 Volts) +AnalogIn Ain(A1); //Analog Input (Signal Input 0 to +3 Volts) +AnalogOut Aout(A2); //Analog Output (Signal Input 0 to +3 Volts) Ticker sample_timer; @@ -36,7 +36,7 @@ centreTap = xn*b0 + xnm1*b1 + xnm2*b2 + xnm3*b3 + xnm4*b4; //IIR Filter yn = centreTap*a0 - a1*ynm1 - a2*ynm2 - a3*ynm3 - a4*ynm4; //Result in yn - Aout=yn+0.5f; //Output resultant to DAC. Again MBED uses 0.0 to 1.0 float!!!!!! and Offset to give 0 to 3V3 range + Aout= yn+0.5f; //Output resultant to DAC. Again MBED uses 0.0 to 1.0 float!!!!!! and Offset to give 0 to 3V3 range //THESE NEED TO BE LOADED IN THIS ORDER OTHERWISE ALL xnm VALUES WILL BECOME THE SAME AS xn xnm4 = xnm3;