Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Adding PWM for ATmega16

(you are viewing a thread; or go back to list of threads)

Adding PWM for ATmega16 (by Shaunak Manurkar)
Hi there,

I have a ATmega16 with a wheel encoder and I want to use PWM to change the speed of the motor.

Data sheet of the Atmega16 says that it has PWM channel, but LDmicro gives an error when PWM is selected for the particular controller.

So, is it possible to edit the source code such that ATmega16 will support PWM?

If yes, which file should I edit?
Tue Mar 22 2016, 09:47:47
(no subject) (by Ihor Nehrutsa)
Atmel AVR ATmega16 40-PDIP and
Atmel AVR ATmega162 40-PDIP and
Atmel AVR ATmega32 40-PDIP
has an error in pwmNeedsPin in mcutable.h.

You can edit mcutable.h according to attached mcutable_part.h.
See line that has comment " // OC2".
And recompile ldmicro.

Or use
LDmicro.GitHub Release 3.1.1 form
http://cq.cx/ladder-forum.pl?action=viewthread&parent=4895
This error is fixed.
Wed Mar 23 2016, 13:00:17, download attachment mcutable_part.h
(no subject) (by Shaunak Manurkar)
Thanks Ihor..!!
Mon Mar 28 2016, 09:13:02
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):