[closed, no answer though]Which timer used by Arduino in NANO every?

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

 

Timer0 has been used by arduino In NANO,  what about NANO every?

TCA has been requisitioned?

 

How to output 40K HZ  PWM in NANO every?

I think it is better to use TCB, for there are 4 of it.

But I don't know how to get it.

With 8 bit PWM mode, what I get is like this:

the counter is 16 bits and the CCMPL/CCMPH is 8 bits, it just output half PWM :)

amazing.

 

 

This topic has a solution.
Last Edited: Sun. May 3, 2020 - 02:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Look at the core code - it's on your computer somewhere in the Arduino directory.

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


PWM output on PF5 of 4809 is right.

 

It should be other hardware parts caused. 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry, the reason is that the USBee is crazy.

The PCBA works well.

The frquency is not right, but that is another problem.

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

By reverse engineering, I have found that TCA0.SINGLE is used for pwm 5,9,10, TCB0 is used for pwm 6, and TCB1 is used for pwm 3.

I have found it crazy not to find an official documentation with this information anywhere.

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

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

It's in the source code, of course:

 

https://github.com/arduino/Ardui...