Skip to content

Commit 3e8dadd

Browse files
committed
Temp changes to firmware for pcb testing
1 parent 5f00de8 commit 3e8dadd

File tree

2 files changed

+2
-2
lines changed
  • SecondaryConverter/Firmware/FINAL/PiControllerActivity/PiControllerActivity

2 files changed

+2
-2
lines changed

SecondaryConverter/Firmware/FINAL/PiControllerActivity/PiControllerActivity/PI_Control.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void calculateError(uint16_t measuredVolt) {
2727
intError += propError * elapsedTime; //Calculate the integral error
2828

2929
int32_t output = kp * propError + ki * intError; //Sum errors
30-
setPWM(output);
30+
//setPWM(output);
3131

3232
//errorHasBeenCalc = true; //Set flag to true to adjust pi. Could just call pi adjustment function from here - no need for flags
3333
}

SecondaryConverter/Firmware/FINAL/PiControllerActivity/PiControllerActivity/pwm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void pwmInit(){
1717
TCCR0A |= (1<<WGM01) | (1<<WGM00); //Fast PWM mode.
1818
TCCR0B |= (1<<CS02); // 256x prescaling.
1919
DDRD |= (1<<PORTD6);
20-
OCR0A = 0; //Set duty cycle to 0% to begin with
20+
OCR0A = 128; //Set duty cycle to 0% to begin with
2121
OCR0B = 255;
2222

2323
}

0 commit comments

Comments
 (0)