??? 06/13/12 04:51 Read: times |
#187688 - Advice on what ? Responding to: ???'s previous message |
Martin Eliáš said:
... coming from Czech Republic to you for the advice :)
LED PWM is interesting on a 89S52. Has your Prof defined any resolution, and PWM repeat frequencies ? Does he want 0% and 100% levels as DC ? What about PDM (Pulse Density Modulation) ? Google CD4089 There are many ways to tackle this, depends on what matters : In a 89S52 you could fit 4 channels of 256 play-back booleans into the upper 128 bytes of RAM. ( == 4 LEDs). Opcode here is MOV A,@Ri You can cover many modulation schemes here and even hide/embed data in the LED modulation, so you can send status info. Or, you can use CJNE/DJNZ opcodes in multiple ways, to give 2/3/4/n channels of PWM timing. All systems will have a fast interrupt, maybe 10-40KHz region, that check each time slot for Pin == On or Off. With careful crafting you might even avoid needing to push/pop anything in your fast interrupt. |
Topic | Author | Date |
AT89S52 - PWM RGB LED Control | 01/01/70 00:00 | |
a couple of notes | 01/01/70 00:00 | |
Where are you stuck? | 01/01/70 00:00 | |
Advice on what ? | 01/01/70 00:00 | |
Your reset scheme is unsuited... | 01/01/70 00:00 | |
good tutorial | 01/01/70 00:00 | |
9V rechargable alkaline battery? | 01/01/70 00:00 | |
Definitely Primary! | 01/01/70 00:00 | |
going by the instructions ... | 01/01/70 00:00 |