MEGA1280 Data sheet, something I'm not understanding

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The data sheet for the MEGA 1280 states that there are 12 PWM pins, Table 3-1 page 7.

However, after rading the Port discriptions, there are 15 pwm pins.

Port B = 4
Port E = 3
Port G = 1
Port H = 4
Port L = 3

Total = 15

Further more, a Schematic for the Arduino MEGA shows 5 pwm pins on Port E or a total of 17. PE_0 and PE_1 which are listed in the data sheets as TXD0 and RXD0, not as PWMs.

Even if we ignore those, there is still 3 pins left that are extra. So, is there actually 15 PWMs and the Data sheet stateing 12 incorrect?

What am I missing?

Don't Let the smoke out!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Counting round the 1280 pinout I see:

pins 1, 5, 6, 7, 15, 16, 17, 18, 23, 24, 25, 26, 38, 39, 40

That's 15, so I'd tend to agree with you but without going into all the details maybe the use of some of these is mutually exclusive or something like that?

If you are looking at this because you have 20 or 32 or similar number of servos to drive in a complex robot you might be better off doing them all "soft" in a homogeneous way rather than spreading their control over lots of different timers.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the confirmation, I see that you too skipped pins 2 and 3, which the schematic for the Arduino MEGA has listed as PWMs, so I am going to assume that the schematic is incorrect.

Actually I am doing a mini break out board for the MEGA1280 chip. So I am double checking everything.

Don't Let the smoke out!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Table 3-1 states 12 total "16 bits resolution PWM channels". Each 16 bit timer/counter has 3 output compares for a total of 12.

If you add in the 8 bits resolution PWM channels, there are 4 more for a total of 16, but there is no table 3-1 column for this combined 8/16 bit PWM channel count total.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mike B wrote:
Table 3-1 states 12 total "16 bits resolution PWM channels". Each 16 bit timer/counter has 3 output compares for a total of 12.

If you add in the 8 bits resolution PWM channels, there are 4 more for a total of 16, but there is no table 3-1 column for this combined 8/16 bit PWM channel count total.

Ah, thank you.
I was just tracking down why there was a OC5a,b,c but only a OC2,a,b and no c. That answers my question then.

THANKS!

Don't Let the smoke out!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah I see the 15 versus 16 confusion. It's on pin 26, PB7 which is listed as both OC0A *and* OC1C

So there may be 16 but it looks like 15 usable at any one time.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Ah I see the 15 versus 16 confusion. It's on pin 26, PB7 which is listed as both OC0A *and* OC1C

So there may be 16 but it looks like 15 usable at any one time.

Yep you are right - cool.

Now that is settled I can move forward :wink:

THANKS ALL

Don't Let the smoke out!