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 - Atmega32 have PWM ?

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

Atmega32 have PWM ? (by Ilie)
Hi Jonatan, I saw in the datasheet for Atmega32 has 4-pin PWM but in the Progam LDmicro this statement can not be used and you can not assign a port.
Port B bit 3
Port D bit 7
Port D bit 5
Port D bit 4

Thank you very much.
Mon Jan 4 2010, 00:08:02
(no subject) (by Jonathan Westhues)
Not every feature of every micro is supported. It does seem like it would be possible to generate code for that peripheral, but LDmicro currently doesn't.
Mon Jan 4 2010, 00:23:13
(no subject) (by Ilie)
But I can use more instructions to replace the PWM instruction, if you have time please give me an example.
Mon Jan 4 2010, 03:36:19
(no subject) (by Jonathan Westhues)
Perhaps you mean software PWM, like

http://cq.cx/ladder-forum.pl?action=viewthread&parent=3

or the attachment.

This works on any digital output, but only for output frequencies that are slow compared to your cycle time.
Mon Jan 4 2010, 03:39:29, download attachment software-pwm.ld
(no subject) (by Ilie)

You have a plan for improvement in this regard in the future?
Thenk you for all.
Tue Jan 5 2010, 12:51:14
(no subject) (by Ilie)

Please can you tell me if I can produce 16,000 Hz softwere.
Thank you.
Sat Jan 16 2010, 17:12:20
(no subject) (by Ilie)
Please help if you're nice to tell me, is likely to generate a frequency between 1-16000 Hz without PWM.
I want to replace the sound instruction that other software have. And I want do that with Ldmicro.
Thanks
Mon Jan 18 2010, 08:41:04
(no subject) (by Jonathan Westhues)
There is no good way. Software PWM cannot generate an output faster than 1/(2*Tcycle), so this is much too fast.

Some other tools have instructions to generate such frequencies in software, by bit-banging quickly. But that would stop the PLC from cycling and is therefore not possible in LDmicro.
Mon Jan 18 2010, 12:38:23
(no subject) (by Ilie)
THank You for amability.
Mon Jan 18 2010, 13:50:13
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):