Hello, I’m not good at English…
I can’t find any information on the internet, so I decided to asking for help directly.
→ 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.
→ 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.
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)