iannez Newbie
 Joined: 05/07/2019 Location: ItalyPosts: 23 |
Posted: 01:33pm 25 Jan 2021 |
|
|
|
Good evening everyone and hello podia!
I tried the new sketch, it's perfect! the wave is tracked perfectly, in a short time I will do the test of the two superimposed voltages with connected light load.
I have inserted these lines in the sketch which probably improve the overall system noise. with my instruments I do not appreciate the differences, maybe with your rigol1054 you notice something.
#include <avr/power.h> setup() { //https://www.gammon.com.au/forum/?id=11497 //power_adc_disable(); // ADC converter power_spi_disable(); // SPI //power_usart0_disable();// Serial (USART) power_timer0_disable();// Timer 0 //power_timer1_disable();// Timer 1 power_timer2_disable();// Timer 2 power_twi_disable(); // TWI (I2C) DIDR0 = DIDR0 | B00111111; //Digital input disabled on all ADC 0-5 ports }
let me know otherwise if there are no differences I delete them: D
to see if I understand how the new sketch works I will try to experiment on a sketch with different PWM freq and NPWM in order to verify how the parameters affect.
thank you soon, A. |