Forum

Einloggen | Registrieren | RSS  

PIC-Microcontroller für RGB-Controller (Elektronik)

verfasst von hws(R) E-Mail, 59425 Unna, 28.02.2011, 18:32 Uhr
(editiert von hws am 28.02.2011 um 18:52)

» Wie schwierig ist es, PWM mit Software zu Programmieren??

ÄÄhhh ... 42 .. ? (siehe: Per Anhalter durch die Galaxis) ;-)

1.) mit welcher Frequenz soll die LEDs getaktet werden?
2.) in wieviel Stufen soll die Helligkeit eingestellt werden?
3.) 1.)*2.) ergibt eine Taktfrequenz bzw Zeit für einen Taktschritt
4.) Mit der Taktzeit aus 3 programmierst du einen Timer im Interruptmodus.
5.) Einzige Aktion in dieser Interruptroutine: Einen Zähler inkrementieren und bei Erreichen des Zählerstandes aus 2.) diesen wieder auf Null setzen.
6.) Im Hauptprogramm legst du für jede LED eine Helligkeit fest von 0...(Punkt2.)
Bzw änderst sie nach bestimmten Zeiten, Formeln, Eingaben ...

7.) Eine ständig durchlaufene Routine im Hauptprogramm:
Zählerstand aus 5.) für jede LED mit deren gewünschter Helligkeit aus 6.) vergleichen. Wenn kleiner = LED an, sonst LED aus.

Edit: zweite Frage.
» ... unterschied zwischen PGD/PGC und ICSPDAT/ICSPCLK?

Hier einfach verständlich: http://www.sprut.de/electronic/pic/icsp/icsp.htm
(Und auch sonst für dich lesenswert)

Hier ausführlich: http://ww1.microchip.com/downloads/en/devicedoc/30277d.pdf

hws



Gesamter Thread:

PIC-Microcontroller für RGB-Controller - obiplal(R), 24.02.2011, 19:05 (Elektronik)
PIC-Microcontroller für RGB-Controller - hws(R), 24.02.2011, 19:18
PIC-Microcontroller für RGB-Controller - obiplal(R), 24.02.2011, 19:24
PIC-Microcontroller für RGB-Controller - geralds(R), 24.02.2011, 19:46
PIC-Microcontroller für RGB-Controller - obiplal(R), 24.02.2011, 19:48
PIC-Microcontroller für RGB-Controller - geralds(R), 24.02.2011, 20:30
PIC-Microcontroller für RGB-Controller - obiplal(R), 24.02.2011, 20:37
PIC-Microcontroller für RGB-Controller - geralds(R), 24.02.2011, 20:46
PIC-Microcontroller für RGB-Controller - obiplal(R), 24.02.2011, 20:57
PIC-Microcontroller für RGB-Controller - geralds(R), 24.02.2011, 21:04
PIC-Microcontroller für RGB-Controller - hws(R), 24.02.2011, 22:32
PIC-Microcontroller für RGB-Controller - obiplal(R), 28.02.2011, 17:56
PIC-Microcontroller für RGB-Controller - hws(R), 28.02.2011, 18:32
PIC-Microcontroller für RGB-Controller - geralds(R), 28.02.2011, 18:53
PIC-Microcontroller für RGB-Controller - obiplal(R), 28.02.2011, 20:21
PIC-Microcontroller für RGB-Controller - geralds(R), 28.02.2011, 21:00
PIC-Microcontroller für RGB-Controller - obiplal(R), 28.02.2011, 21:05
PIC-Microcontroller für RGB-Controller - geralds(R), 28.02.2011, 21:28