how to change duty cycle of dc-dc converter circuit to provide 14V at output

I am working on designing of inductor-less dc-dc boost converter with regulated output voltage of 14V to charge 12V 4.5AH sealed lead acid battery. The converter is boost type which will step-up input voltage on its output. To regulate converter output at fixed volt PWM signals of variable duty cycle are generated with fixed 1 kHz switching frequency. It has two bjt switches which will be on or off in alternate cycle means at one time one will be on and at other second switch be on thus by varying on/off time of both output will be fixed. I have written its code in which arduino uno will receive output of converter from A1 analog pin . after sensing Vout for ADC conversion it is divided by 24 then Vout will be compare to set point of 14V in a loop. If Vout greater than 14V then duty cycle will be decreased to bring it back at 14V or vice versa. Similarly duty cycle is defined by 'value' in program which increase or decrease according to output. finally it will generate pwm signals from pin 9 and pin 10..pin 10 pwm is inverted.
But this logic is not working correctly ..any problem in the code or what. Circuit is always showing 78.4% duty cycle on LCD nor it is increasing or decreasing according to output. plz help how i can correct..
code is below
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int P1 = 9; // PWM PIN 1
int P2 = 10; // PWM PIN 2
int value = 6; // Duty cycle
float vout; // Output voltage
// the setup routine runs once when you press reset:
long double counter = 0;

void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.print("Welcome to the ");
lcd.setCursor(0,1);
lcd.print("Boost Converter");

pinMode(P1, OUTPUT);
pinMode(P2, OUTPUT);
delay(2000);
lcd.clear();
}

// the loop routine runs over and over again forever:
void loop() {

if (counter = 10000){

if (vout < 14){value += 1;} // Chechking trwshold on Output Voltage
else if (vout > 14){value -= 1;}

if (value < 0){value = 0;} // CHecking PWM duty cycle

if (value > 200){value = 200;}

counter = 0;
}
int sensorValue = analogRead(A1);
vout = sensorValue/24 ;

lcd.setCursor(0,0);
lcd.print("Vout = ");
lcd.setCursor(7,0);
lcd.print(vout);
//Serial.println(vout);
//Serial.print(vout);

// cycle and cycle value
lcd.setCursor(0,1);
lcd.print("Cycle = ");
lcd.setCursor(7,1);
lcd.print(value*0.392);

analogWrite(9, value); // PWM Generation
invertAnalogWrite(10, value);
counter++;

}

void invertAnalogWrite(int pin, int value)
{
analogWrite(pin, value);
TCCR1A = TCCR1A & ~B00110000; //switch off output B
TCCR1A |= B00110000; //switch on the B output with inverted output
}

Hi, welcome to the forum.
I like to know how the hardware is. Could you make a schematic, it can be a drawing on paper and make a photo of it.
In the past I have made a few of those, most of them with 4 transistors, the first two as emitter follower (with emitters connected) the second two with collector connected as output. The output signal was fed into a voltage multiplier with diodes and capacitors. The output voltage was controlled by the frequency.

A long double is not used in the Arduino. Do you mean a "unsigned long" ?

This line : vout = sensorValue / 24 ;
It is not clear what the "24" is, could you use it like this:

float voltageAtPin = (float) sensorValue / 1023.0 * 5.0;
vout = voltageAtPin .....            // calculation depends on voltage divider

You code is running without delay, and you count up to 10000. I would like to use a steady timing, regardsless of the code. You could use a delay(), but also millis().

Changing the PWM is not a good way for a voltage multiplier. You could regulate the output by controlling the frequency. In that case the Arduino tone() function can be used.

When you use the 5V as (default) reference to read the analog input, it is nog accurate.
You must know the voltage of the battery, because it is dangerous to overcharge them.
The sealed led gel batteries are used in the same way as normal lead-acid batteries.