11 Şubat 2010 Perşembe
LED ANİMASYON PİK PROGRAMI
' Written for Thibault in March 2003
' Version 2
'
' Olivier de Broqueville
'
' Internal osc.
DEVICE 16F628
REMARKS=ON
CONFIG WDT_OFF, BODEN_ON,INTRC_OSC_NOCLKOUT,LVP_OFF,CP_OFF, PWRTE_ON, MCLRE_OFF
DECLARE XTAL = 4
DIM IMG ' Image pointer
DIM FREQ ' delay between each frame
DIM T ' work variable
SYMBOL L1 = PORTA.4
SYMBOL L2 = PORTA.3
SYMBOL L3 = PORTA.2
SYMBOL L4 = PORTA.1
SYMBOL L5 = PORTA.0
SYMBOL L6 = PORTA.7
SYMBOL V = PORTA.6 ' Port assignment for POT
SYMBOL PS = 2 ' Value used to smooth the display of figures by adding a small delay
TRISA=%01000000 ' Set PORTA for OUTPUT (except A.6 -> POT). In charge of LINES
TRISB=000000 ' Set PORTB for OUTPUT. In charge of columns
'*****************************************************************************
DEBUT:
LOW L1: LOW L2 : LOW L3: LOW L4: LOW L5: LOW L6 ' All LEDs OFF
IMAGE:
FOR IMG = 0 TO 236 ' Scan 237 images
FREQ= POT V,64 ' Read POT value
IF FREQ<2 THEN FREQ=2 ' If no POT connected assume result is 2 FOR T=1 TO FREQ ' Progression of pictures ' Each data represents a column => 6 data needed for a
' complete frame
' Now let's scan (and multiplex) each row
HIGH L1:LOW PORTB ' Line 1, clear port b
PORTB=LREAD AFFI+(IMG*6) ' And appropriate DATA to illuminate LEDs of a column
DELAYMS ps ' Wait a bit to smooth display
LOW L1:HIGH L2:LOW PORTB ' Line 2, clear port b
PORTB=LREAD AFFI+(IMG*6)+1 ' And appropriate DATA to illuminate LEDs of a column
DELAYMS ps ' Wait a bit to smooth display
LOW L2:HIGH L3:LOW PORTB ' Line 3, clear port b
PORTB=LREAD AFFI+(IMG*6)+2 ' And appropriate DATA to illuminate LEDs of a column
DELAYMS ps ' Wait a bit to smooth display
LOW L3:HIGH L4:LOW PORTB ' Line 4, clear port b
PORTB=LREAD AFFI+(IMG*6)+3 ' And appropriate DATA to illuminate LEDs of a column
DELAYMS ps ' Wait a bit to smooth display
LOW L4:HIGH L5:LOW PORTB ' Line 5, clear port b
PORTB=LREAD AFFI+(IMG*6)+4 ' And appropriate DATA to illuminate LEDs of a column
DELAYMS ps ' Wait a bit to smooth display
LOW L5:HIGH L6:LOW PORTB ' Line 6, clear port b
PORTB=LREAD AFFI+(IMG*6)+5 ' And appropriate DATA to illuminate LEDs of a column
DELAYMS ps ' Wait a bit to smooth display
LOW L6:LOW PORTB ' And ALL OFF
NEXT T
NEXT IMG
GOTO IMAGE ' And next loop through all images
' *****************************************************************************
' DATA file. The name has to be AFFI
AFFI: ' DATA: Each data= one line / 6 data= one frame
LDATA 32, 0, 0, 0, 0, 0
LDATA 16, 32, 0, 0, 0, 0
LDATA 8, 16, 32, 0, 0, 0
LDATA 4, 8, 16, 32, 0, 0
LDATA 2, 4, 8, 16, 32, 0
LDATA 1, 2, 4, 8, 16, 32
LDATA 0, 1, 2, 4, 8, 16
LDATA 0, 0, 1, 2, 4, 8
LDATA 0, 0, 0, 1, 2, 4
LDATA 0, 0, 0, 0, 1, 2
LDATA 0, 0, 0, 0, 0, 1
LDATA 0, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 32
LDATA 0, 0, 0, 0, 32, 16
LDATA 0, 0, 0, 32, 16, 8
LDATA 0, 0, 32, 16, 8, 4
LDATA 0, 32, 16, 8, 4, 2
LDATA 32, 16, 8, 4, 2, 1
LDATA 16, 8, 4, 2, 1, 0
LDATA 8, 4, 2, 1, 0, 0
LDATA 4, 2, 1, 0, 0, 0
LDATA 2, 1, 0, 0, 0, 0
LDATA 1, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 32, 0, 0, 0, 0, 0
LDATA 48, 0, 0, 0, 0, 0
LDATA 56, 0, 0, 0, 0, 0
LDATA 28, 0, 0, 0, 0, 0
LDATA 14, 0, 0, 0, 0, 0
LDATA 7, 0, 0, 0, 0, 0
LDATA 3, 1, 0, 0, 0, 0
LDATA 1, 1, 1, 0, 0, 0
LDATA 0, 1, 1, 1, 0, 0
LDATA 0, 0, 1, 1, 1, 0
LDATA 0, 0, 0, 1, 1, 1
LDATA 0, 0, 0, 0, 1, 3
LDATA 0, 0, 0, 0, 0, 7
LDATA 0, 0, 0, 0, 0, 14
LDATA 0, 0, 0, 0, 0, 28
LDATA 0, 0, 0, 0, 0, 56
LDATA 0, 0, 0, 0, 32, 48
LDATA 0, 0, 0, 32, 32, 32
LDATA 0, 0, 32, 32, 32, 0
LDATA 0, 32, 32, 32, 0, 0
LDATA 0, 48, 32, 0, 0, 0
LDATA 0, 56, 0, 0, 0, 0
LDATA 0, 28, 0, 0, 0, 0
LDATA 0, 14, 0, 0, 0, 0
LDATA 0, 6, 2, 0, 0, 0
LDATA 0, 2, 2, 2, 0, 0
LDATA 0, 0, 2, 2, 2, 0
LDATA 0, 0, 0, 2, 6, 0
LDATA 0, 0, 0, 0, 14, 0
LDATA 0, 0, 0, 0, 28, 0
LDATA 0, 0, 0, 16, 24, 0
LDATA 0, 0, 16, 16, 16, 0
LDATA 0, 0, 24, 16, 0, 0
LDATA 0, 0, 28, 0, 0, 0
LDATA 0, 0, 12, 4, 0, 0
LDATA 0, 0, 4, 12, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 63, 12, 12, 12, 12, 12
LDATA 63, 12, 12, 12, 12, 12
LDATA 18, 18, 30, 30, 18, 18
LDATA 18, 18, 30, 30, 18, 18
LDATA 12, 12, 12, 12, 12, 12
LDATA 12, 12, 12, 12, 12, 12
LDATA 28, 18, 28, 18, 18, 28
LDATA 28, 18, 28, 18, 18, 28
LDATA 12, 18, 18, 30, 18, 18
LDATA 12, 18, 18, 30, 18, 18
LDATA 18, 18, 18, 18, 18, 12
LDATA 18, 18, 18, 18, 18, 12
LDATA 16, 16, 16, 16, 16, 30
LDATA 16, 16, 16, 16, 16, 30
LDATA 63, 12, 12, 12, 12, 12
LDATA 63, 12, 12, 12, 12, 12
LDATA 63, 12, 12, 12, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 63, 63, 63, 63, 63, 63
LDATA 63, 63, 63, 63, 63, 63
LDATA 0, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 12, 12, 63, 63, 12, 12
LDATA 51, 45, 33, 32, 18, 12
LDATA 12, 30, 63, 30, 12, 12
LDATA 12, 12, 12, 30, 12, 18
LDATA 12, 30, 45, 45, 30, 12
LDATA 51, 63, 18, 18, 12, 12
LDATA 12, 12, 63, 63, 12, 12
LDATA 18, 51, 0, 0, 51, 18
LDATA 33, 0, 0, 0, 0, 33
LDATA 0, 0, 12, 12, 0, 0
LDATA 0, 30, 18, 18, 30, 0
LDATA 63, 33, 33, 33, 33, 63
LDATA 0, 30, 18, 18, 30, 0
LDATA 0, 0, 12, 12, 0, 0
LDATA 0, 18, 0, 0, 18, 0
LDATA 33, 0, 0, 0, 0, 33
LDATA 33, 0, 0, 0, 0, 33
LDATA 0, 18, 0, 0, 18, 0
LDATA 0, 0, 12, 12, 0, 0
LDATA 1, 3, 12, 12, 0, 0
LDATA 32, 48, 12, 12, 0, 0
LDATA 0, 0, 12, 12, 16, 48
LDATA 0, 0, 12, 12, 3, 1
LDATA 12, 12, 0, 12, 12, 12
LDATA 0, 0, 0, 12, 12, 12
LDATA 12, 12, 0, 12, 12, 12
LDATA 0, 0, 0, 12, 12, 12
LDATA 12, 12, 0, 12, 12, 12
LDATA 63, 12, 0, 0, 0, 0
LDATA 12, 63, 0, 0, 0, 0
LDATA 0, 18, 30, 30, 18, 0
LDATA 0, 0, 63, 63, 0, 0
LDATA 0, 18, 30, 30, 18, 0
LDATA 0, 0, 63, 63, 0, 0
LDATA 0, 18, 30, 30, 18, 0
LDATA 0, 0, 63, 63, 0, 0
LDATA 0, 0, 33, 33, 0, 0
LDATA 0, 0, 18, 18, 0, 0
LDATA 0, 0, 12, 12, 0, 0
LDATA 0, 12, 0, 0, 12, 0
LDATA 12, 0, 0, 0, 0, 12
LDATA 63, 63, 63, 63, 63, 63
LDATA 63, 63, 63, 63, 63, 63
LDATA 0, 30, 30, 30, 30, 0
LDATA 0, 30, 30, 30, 30, 0
LDATA 0, 0, 12, 12, 0, 0
LDATA 0, 0, 12, 12, 0, 0
LDATA 0, 0, 63, 63, 0, 0
LDATA 12, 12, 12, 12, 12, 12
LDATA 0, 0, 63, 63, 0, 0
LDATA 63, 63, 63, 63, 63, 63
LDATA 63, 63, 63, 63, 63, 63
LDATA 0, 0, 0, 0, 0, 0
LDATA 63, 12, 12, 12, 12, 12
LDATA 12, 63, 12, 12, 12, 12
LDATA 12, 12, 63, 12, 12, 12
LDATA 12, 12, 12, 63, 12, 12
LDATA 12, 12, 12, 12, 63, 12
LDATA 12, 12, 12, 12, 12, 63
LDATA 63, 51, 51, 51, 51, 51
LDATA 51, 63, 51, 51, 51, 51
LDATA 51, 51, 63, 51, 51, 51
LDATA 51, 51, 51, 63, 51, 51
LDATA 51, 51, 51, 51, 63, 51
LDATA 51, 51, 51, 51, 51, 63
LDATA 12, 0, 0, 0, 0, 0
LDATA 0, 12, 0, 0, 0, 0
LDATA 0, 0, 12, 0, 0, 0
LDATA 0, 0, 0, 12, 0, 0
LDATA 0, 0, 0, 0, 12, 0
LDATA 0, 0, 0, 0, 0, 12
LDATA 3, 0, 0, 0, 0, 0
LDATA 0, 3, 0, 0, 0, 0
LDATA 0, 0, 3, 0, 0, 0
LDATA 0, 0, 0, 3, 0, 0
LDATA 0, 0, 0, 0, 3, 0
LDATA 0, 0, 0, 0, 0, 3
LDATA 48, 0, 0, 0, 0, 0
LDATA 0, 48, 0, 0, 0, 0
LDATA 0, 0, 48, 0, 0, 0
LDATA 0, 0, 0, 48, 0, 0
LDATA 0, 0, 0, 0, 48, 0
LDATA 0, 0, 0, 0, 0, 48
LDATA 63, 12, 12, 12, 12, 12
LDATA 18, 18, 30, 30, 18, 18
LDATA 12, 12, 12, 12, 12, 12
LDATA 28, 18, 30, 17, 17, 30
LDATA 12, 18, 30, 18, 18, 18
LDATA 18, 18, 18, 18, 18, 12
LDATA 16, 16, 16, 16, 16, 30
LDATA 63, 12, 12, 12, 12, 12
LDATA 12, 12, 63, 63, 12, 12
LDATA 33, 33, 33, 18, 12, 12
LDATA 12, 18, 30, 18, 18, 18
LDATA 16, 16, 16, 16, 16, 30
LDATA 30, 16, 28, 28, 16, 30
LDATA 33, 49, 41, 37, 35, 33
LDATA 63, 12, 12, 12, 12, 12
LDATA 12, 12, 12, 12, 12, 12
LDATA 33, 49, 41, 37, 35, 33
LDATA 30, 16, 28, 28, 16, 30
LDATA 0, 30, 0, 30, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 18, 45, 33, 18, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 63, 12, 12, 12, 12, 12
LDATA 63, 12, 12, 12, 12, 12
LDATA 18, 18, 30, 30, 18, 18
LDATA 18, 18, 30, 30, 18, 18
LDATA 12, 12, 12, 12, 12, 12
LDATA 12, 12, 12, 12, 12, 12
LDATA 28, 18, 28, 18, 18, 28
LDATA 28, 18, 28, 18, 18, 28
LDATA 12, 18, 18, 30, 18, 18
LDATA 12, 18, 18, 30, 18, 18
LDATA 18, 18, 18, 18, 18, 12
LDATA 18, 18, 18, 18, 18, 12
LDATA 16, 16, 16, 16, 16, 30
LDATA 16, 16, 16, 16, 16, 30
LDATA 63, 12, 12, 12, 12, 12
LDATA 63, 12, 12, 12, 12, 12
LDATA 63, 12, 12, 12, 12, 12
LDATA 0, 0, 0, 0, 0, 0
LDATA 0, 0, 0, 0, 0, 0
LDATA 63, 63, 63, 63, 63, 63
LDATA 63, 63, 63, 63, 63, 63
LDATA 0, 0, 0, 0, 0, 0
İzleyiciler
TIMING CALCULATORS FOR THE LM555
TIMING CALCULATORS FOR THE LM555
LED DİRENÇ HESAPLAMA
All LEDs require current limiting, without a current limiting mechanism the LED will usually burn out in under a second. Adding a simple resistor is the easiest way to limit the current. Use the calculator below to find out the value of resistor you require.
For example if you are wanting to power one of our_blank">red LEDs in an automotive application you would see that the typical forward voltage is 2.0 Volts and the maximum continuous forward current is 30mA. Therefore you would enter 14.5, 2.0 and 30 into the Single LED calculation box. After calculating you get 470ohm 1 watt as the result. Here is a that allows you to enter a resistor value and generate the corresponding color code.
Note: For automotive applications use the actual system voltage, not 12 Volts. Most 12 Volt system actually operate at around 14.5 Volts.
Lm317 uygulama devreleri ve detayli bilgiye Buradan ulasabilirsiniz |
LM555 - ASTABLE OSCILLATOR CALCULATOR
NOTE: The leakage currents of electrolytic capacitors will affect the actual output results of the timers. To compensate for leakage it is often better to use a higher value capacitor and lower value resistances in the timer circuits.
LM555 Astable Oscillator Circuit Diagram
The next calculator can find the capacitance needed for a particular output frequency if the values of R1 and R2 are known.
Value Of R1 Ohms | Value Of R2 Ohms |
Frequency Desired Hertz |
| |
|
Hiç yorum yok:
Yorum Gönder