Please, I want to know MEGA's Fast PWM mode

Hello, I’m not good at English…

I can’t find any information on the internet, so I decided to asking for help directly.

Introduction
→ My plan is simple Automobile system with Linescan Camera (TSL1401). I used Arduino UNO. However I have to change board. Because I want to more function. So I will change my board to Arduino MEGA.

My Problem
→ I don’t know very well about Registor and Timer. about UNO, I can easily find fast PWM information on the website(https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM) In this site, I used the setting code.

pinMode(3, OUTPUT);
pinMode(11, OUTPUT);
TCCR2A = _BV(COM2A0) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
TCCR2B = _BV(WGM22) | _BV(CS22);
OCR2A = 180;
OCR2B = 50;

But, MEGA’s information doesn’t exist…
I want the same function code on Arduino MEGA.

I attached my Automobile Code.

finally, " I want to use fast PWM mode on MEGA, please help me. I need the code that has the same function on MEGA"

my Uno code

// FAST PWM Mode Setup
TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
TCCR2B = _BV(CS21) | _BV(CS20);
OCR2A = 0; //pin #11
OCR2B = 0; //pin #3

→ How convert for MEGA?

Mark_3.10_D.ino (10.2 KB)

What exactly doesn't work with this code on the Mega?

Well, Mega isn't arrived yet. I will do my project fast. So I ask for help before arriving In Software Part..

If I know same function code, I can easily work.

Ohyunjae: Well, Mega isn't arrived yet. I will do my project fast. So I ask for help before arriving In Software Part..

It is much easier to help when you have tested you program and can tell us what it is doing that is wrong.

And if it is working properly you won't need out help!

The way the Timers work in the Mega is the same as on an Uno - there are just more of them. Study the Atmega 2560 datasheet.

...R