From f23af037a573149b3521bbaa6ec38b023ab3f386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Tue, 14 Mar 2023 13:59:35 +0100 Subject: [PATCH] modbus communication done TODO error modbus --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 9c90edb..24a7ef1 100644 --- a/main.c +++ b/main.c @@ -79,12 +79,12 @@ void main(void) // Disable the Peripheral Interrupts //INTERRUPT_PeripheralInterruptDisable(); - uint16_t foo = 512; + while (1) { - foo = ++foo%1023; - EPWM1_LoadDutyValue(foo); + + EPWM1_LoadDutyValue(holding_registers[0]); input_registers[0] = measure_voltage(); uint16_t valueV = input_registers[0]; uint16_t valueI = measure_current(offsetCurrent);