modbus communication done

TODO error modbus
This commit is contained in:
Rémi Heredero 2023-03-14 13:59:35 +01:00
parent 2c949062dc
commit f23af037a5

6
main.c
View File

@ -79,12 +79,12 @@ void main(void)
// Disable the Peripheral Interrupts // Disable the Peripheral Interrupts
//INTERRUPT_PeripheralInterruptDisable(); //INTERRUPT_PeripheralInterruptDisable();
uint16_t foo = 512;
while (1) while (1)
{ {
foo = ++foo%1023;
EPWM1_LoadDutyValue(foo); EPWM1_LoadDutyValue(holding_registers[0]);
input_registers[0] = measure_voltage(); input_registers[0] = measure_voltage();
uint16_t valueV = input_registers[0]; uint16_t valueV = input_registers[0];
uint16_t valueI = measure_current(offsetCurrent); uint16_t valueI = measure_current(offsetCurrent);