8 bit class D amplifier with AVR microcontroller

Also please check your proteus , which 50mbit optocouplers models are available. They are very fast too , but you need to add external driver to them. Quick googling found this available in stock https://www.teval.ee/en/shop/produc...66497,1566502,5758778,1566499,1566498,1566503 , there is datasheet present too. Look at it. There are many of similar optocouplers present, made by different manufacturer's, but exchangeable, you can use any of them in simulation . I can draw you a solution later how to interact such optocoupler output through cmos logic ic with external power mosfet . https://il.farnell.com/toshiba/tlp2767-tp-e-o/optocplr-digital-50mbps-5kv-sop/dp/3872455 another one.
 
Part of my existing and working design attached , that was DC DC buck converter. U3 optocoupler 50mbit with logic output ,but inverted ,so U4C cd4011 was used to restore normal pulses polarity .Q1 Q2 Q4 Q5 emitter followers , Q3 power mosfet , PS1 isolated dc dc converter . You don't need D2 , i've added it for protection of DC DC converters output in case of mosfet D-G failure .D4 and D11 maybe not needed too .U4D, D12,C10,R25,R24,D3,D5, R2, D13,R9,L1 not needed in your design ,it was part of OCP .R23 is just jumper on pcb .You can try to use TC driver or some other type of ic ,with powerful output to drive mosfet directly , but then you need to match optocouplers output levels with that driver ic input levels (voltage ranges) and drivers supply voltage .
Left pin of R6 is input , in your case output of MCU . You need two pieces of this schematic , one for bottom mosfet (-90V) supply and second for +90V. Note how optocoupler and 4011 is getting power supply ,no connection to GND ,just from isolated converter .You may replace 4011 with 4049 or 4069 , and connect their all six inverters in parallel , and possibly Q1 Q4 will be not needed then . DRV- and DRV+ are isolated 12v output , like pure battery . If you have question about this possible solution ,ask me .
Screenshot from 2023-01-17 17-59-35.png
 
Good recommendation on Si8234 .It can be used in any output configurations ,so including any potential , don't have IR2110 limitations for ground potential .
But now is questions which one is better to use , 8233 or 8234 ,or 8235 .Datasheet contains comparison table .Of course 4.0A version should be used.
Si8234 is single pwm input ,so in example in idle state you want to disable both mosfets ,lets say when audio silence is detected ,but then code needs to be changed ,and disable pin activated .There may be some delay ,until operation is restored .So mcu must always generate half duty cycle ,even if no signal, elsewhere you get dc voltage to speaker .
If using another ones ,with two seperate inputs ,you can control mosfets seperately and have idle state ,when none of them are operating ,like mute when audio signal is too low .That can be used to reduce current consumption in overall ,or have standby mode ,always ready to play , depends on code implementation .But don't forget mcu internal ADC limitations , mostly they are poor , even with constant voltage at input ,they produce not stable readings ,whose can be heard as significant distortion or noise . External ADC are mostly slower ...
 
the 8234 can do deadtime internally,and the microcontroller can shut down the chip when it is not needed,also allowing other sources to disable the chip (various protections implemented outside the micro),With dual input chips the micro could power both mosfets down for the same effect,so in this case whatever is easier to implement in code/hardware