Hi all
Just out of interest,
Looking at the hardware pin capability in the - https://siminnovations.com/wiki/index.p ... re_id_list
For the Leonardo - I just wondered why the possibility of 12 ADC and 7 PWM (hardware) are not possible in AM ? - not all at the same time obviously.... - the board appears capable of such.
Arduino Leonardo hardware I/O
Arduino Leonardo hardware I/O
Joe. CISSP, MSc.
Re: Arduino Leonardo hardware I/O
Hi,
From what I remember, the atmega32u4 has two available timers with 3 channels each. But only 4 pins out of those are mapped to the pins on the board.
Not sure about the analogue stuff, but there is probably a reason why it only has A0 through A5.
Corjan
From what I remember, the atmega32u4 has two available timers with 3 channels each. But only 4 pins out of those are mapped to the pins on the board.
Not sure about the analogue stuff, but there is probably a reason why it only has A0 through A5.
Corjan
Re: Arduino Leonardo hardware I/O
Hi @Corjan
Interesting.
The ADC Multiplexor on the micro does seem to be a single 12 way MUX allowing 12 independent and simultaneous ADC inputs.
Analog Inputs: A0-A5, A6 - A11 on digital pins 4, 6, 8, 9, 10, and 12
That would be very useful to have.
The PWM, I must admit I am struggling to get my head around the complexity of the timers from the datasheet and have no idea what else you may be using some for
It would appear that the 7 PWM outputs are available from Arduino IDE, but I believe your code is custom ?
Joe
Joe. CISSP, MSc.
Re: Arduino Leonardo hardware I/O
Hi,
Basically, you can use 1 timer to drive 3 PWM channels.
The uc has 3 available timers, of which 1 is used for the LED's, and two are available for PWM. Of those two, 1 are mapped to 3 pins, the other to 1 pin.
The analog pins could indeed probably be expanded, but I'd rather just keep using the Ax pins, just like all other Arduino's.
Corjan
Basically, you can use 1 timer to drive 3 PWM channels.
The uc has 3 available timers, of which 1 is used for the LED's, and two are available for PWM. Of those two, 1 are mapped to 3 pins, the other to 1 pin.
The analog pins could indeed probably be expanded, but I'd rather just keep using the Ax pins, just like all other Arduino's.
Corjan
Re: Arduino Leonardo hardware I/O
Hi Corjan, Understood. I can fully appreciate why you would want to maintain standardisation across the various units. The Leonardo is a lovely unit and would offer it's flexibility for ADC inputs in Messageport, or indeed, as a HID controller, most likely combining both the HID and 12 ADC inputs.Corjan wrote: ↑Sat Apr 17, 2021 7:54 am Hi,
Basically, you can use 1 timer to drive 3 PWM channels.
The uc has 3 available timers, of which 1 is used for the LED's, and two are available for PWM. Of those two, 1 are mapped to 3 pins, the other to 1 pin.
The analog pins could indeed probably be expanded, but I'd rather just keep using the Ax pins, just like all other Arduino's.
Corjan
I also note you have added the rx/tx serial pins D0 and D1 as I/O now for the 32U4, much appreciated. (an the same for the pro-micro or any 32U4), nice one.
Out of interest, - for the LED function ?, it would be logical to presume from your post (well logical for me haha) ) that the LED function is also using PWM. Is this simply a case of selective use of the PWM resolution abilities of the various timers or a software pwm solution for LED ?
Joe
Joe. CISSP, MSc.