Where will I get information about the timer output to Mega pins assignment? like the attachment for UNO.
google is always worth a 5 minutes try
5th hit in the google results
pretty detailed about a lot of aspects
best regards Stefan
any newbee can apply the most professional habit from the first line of code they write on their own:
add only ONE thing at a time. Test/debug that ONE thing until that ONE thing works reliable - repeat.
The sad thing is: only the REAL professionals write code this way.
There is a MEGA pinout diagram under Documentation in the Arduino store but it doesn't include the timer numbers.
Yes, I have seen all the pinout diagrams but can't find a reference to the timer outputs to the pinout mapping like the one I attached for the UNO. The PWM pins are shown but I can't find which timer controls which PWM output.
I need to change the PWM frequency of the PWMs I use if needed.
I need a PWM frequency of about 31kHz and need to setup the appropriate timer control register for that. (I use 10 PWMs of the Mega and need to make sure the correct frequency gets to the correct PWM)
Can someone help?
I found the attached two references.
The one says OCR0A is on pin 13 and OCR04C is on pins 4 and 8. The other attachment says timer 0 controls pins 4 1nd 13.
This looks like OCR0B controls pin 4.
Can someone confirm this?
This is what the pinout diagram I have shows:
OC0A PB7 Pin 13 (Yes, same pin as OC1C)
OC0B PG5 Pin 4
OC1A PB5 Pin 11
OC1B PB6 Pin 12
OC1C PB7 Pin 13 (Yes, same pin as OC0A)
OC2A PB4 Pin 10
OC2B PH6 Pin 9
OC3A PE3 Pin 5
OC3B PE4 Pin 2
OC3C PE5 Pin 3
OC4A PH3 Pin 6
OC4B PH4 Pin 7
OC4C PH5 Pin 8
OC5A PL3 Pin 46
OC5B PL4 Pin 45
OC5C PL5 Pin 44
Thanks to you all.