Max freq of PWM from AVR with 8 bits res? - FPGA inside AVR?

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

Hello :-)

Can someone point me to the maximum frequency of PWM with 8 bits resolution I can have? -- I did read the datasheet of ATxmega and discovered that is just get 125kHz (32MHz / 256).

I worked with ATtiny861 that gets 250kHz, a special PLL for PWM at 64MHz, 64MHz / 256 = 256kHz.

Alternatives

Anyone knows if Atmel will get something like PSoC from Cypress?

... complete solution for embedded systems, combining an 8-bit microcontroller, flash memory, and SRAM with customizable analog and digital blocks.

Or maybe should I think in a kind of FPGA (don't understand nothing about it) to make a faster external PWM module?

Thank you.

JPCasainho,
www.Casainho.net
.Portugal

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

Quote:

Or maybe should I think in a kind of FPGA

Atmel combines a FPGA and an AVR in what they call FPSLIC: http://www.atmel.com/products/fp... .

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

JohanEkdahl wrote:
Quote:

Or maybe should I think in a kind of FPGA

Atmel combines a FPGA and an AVR in what they call FPSLIC: http://www.atmel.com/products/fp... .

Okok!! thanks, I will investigate that product from Atmel ;-)

And I couldn't find any AVR with higher frequency (at 8 bits res) than the ATtiny861, 250kHz.

JPCasainho,
www.Casainho.net
.Portugal

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

Leon Heller G1HSM

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

I believe that limit on PWM speed is correct. You are up against fundamental limits of clock speed. PWR repetition frequency is Fclock/2**N, where N is the number of resolution bits and Fclock is the PWM counter clock rate.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

leon_heller wrote:
XMOS: http://www.xmos.com

Eheh - a bit too much for our needs ;-)

I enjoyed the mention to Open Source tools, some of them I know about and use :-)

JPCasainho,
www.Casainho.net
.Portugal

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

When we get up into 100kHz+ speeds, it always begs the question: "Why would this be needed in general-purpose work?"

OK, let's say that OP comes back with a compelling reason. [I'm waiting with bated breath.] While waiting, let's examine

Quote:
I did read the datasheet of ATxmega and discovered that is just get 125kHz (32MHz / 256).

Xmegas are too bullet-riddled for common people to use, but it would sure seem that clkPER4 would be at 4x32MHz=128MHz and thus allow a 500kHz frequency.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
Xmegas are too bullet-riddled for common people to use, but it would sure seem that clkPER4 would be at 4x32MHz=128MHz and thus allow a 500kHz frequency.

Since I understand, Timer to use for PWM just can have clock of max speed of CPU, so, the 32MHz.

And I am looking for that higher frequency for DC-DC circuits, to try lower the values of capacitors and inductors... we are using now the ATtiny861 with PWM of 250kHz.

JPCasainho,
www.Casainho.net
.Portugal

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

Quote:

Since I understand, Timer to use for PWM just can have clock of max speed of CPU, so, the 32MHz.

Yes but PWM then splits this. If it's 8 bit PWM then it chops the frame into 256 steps so 8bit PWM on 32MHz might offer 32M/256 = 125KHz

Cliff

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

Quote:

Since I understand, Timer to use for PWM just can have clock of max speed of CPU, so, the 32MHz.

See "17. Hi-Res - High Resolution Extension". It would appear to me that since it runs off clkPER4 that it would indeed give the capability, but not having used Xmega in anger I cannot verify that.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
Quote:

Since I understand, Timer to use for PWM just can have clock of max speed of CPU, so, the 32MHz.

See "17. Hi-Res - High Resolution Extension". It would appear to me that since it runs off clkPER4 that it would indeed give the capability, but not having used Xmega in anger I cannot verify that.

Hmmm... maybe, if it can have higher resolution, then we can lower it to 8 bits again and have higher frequency.

clawson wrote:

Yes but PWM then splits this. If it's 8 bit PWM then it chops the frame into 256 steps so 8bit PWM on 32MHz might offer 32M/256 = 125KHz

Yes, that's true.

JPCasainho,
www.Casainho.net
.Portugal

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

casainho wrote:

And I couldn't find any AVR with higher frequency (at 8 bits res) than the ATtiny861, 250kHz.

Attiny26 also have a 64Mhz PLL for timer1 :idea: