از دوستانی که با کریستال RTC در عمل کار کردن کسی می دونه وقتی از این کریستال برای تایمر 2 استفاده میشه آیا نیاز به گذاشتن خازن بین پایه های این کریستال تا زمین هست یا نه ؟ اگه باید بزاریم ظرفیت خازن ها باید چقدر باشه ؟
ممنون
ممنون
$regfile = "m8def.dat" $crystal = 8000000 Config Timer2 = Timer , Async = On , Prescale = 128 : Start Timer2 Enable Interrupts Enable Ovf2 On Ovf2 Showe '======================= [CONFIG PORTS FOR OUTPUT] =========================== Config Portc = Output 'all portc for output Ddrc = &HFF '----------------------- Config Portb.0 = Output 'some pin of portb for output Config Portb.1 = Output Config Portb.2 = Output Config Portb.3 = Output Config Portb.4 = Output Config Portb.5 = Output Ddrb.0 = 1 Ddrb.1 = 1 Ddrb.2 = 1 Ddrb.3 = 1 Ddrb.4 = 1 Ddrb.5 = 1 '----------------------- Config Portd.0 = Output 'and some pin of portd for output Config Portd.1 = Output Config Portd.3 = Output Config Portd.4 = Output Ddrd.0 = 1 Ddrd.1 = 1 Ddrd.3 = 1 Ddrd.4 = 1 Declare Sub Trans Dim J1 As Word Do Loop End Showe: J1 = 1 Gosub Trans Waitms 10 J1 = 0 Gosub Trans Return '-------------------------- Sub Trans: Portc.0 = J1.0 Portc.1 = J1.1 Portc.2 = J1.2 Portc.3 = J1.3 Portc.4 = J1.4 Portc.5 = J1.5 '------------- Portb.0 = J1.6 Portb.1 = J1.7 Portb.2 = J1.8 Portb.3 = J1.9 Portb.4 = J1.10 Portb.5 = J1.11 '------------- Portd.0 = J1.12 Portd.1 = J1.13 Portd.3 = J1.14 Portd.4 = J1.15 End Sub
$regfile = "m8def.dat" $crystal = 8000000 Config Timer2 = Timer , Async = On , Prescale = 128 : Start Timer2 Enable Interrupts Enable Ovf2 On Ovf2 Showe Config Portb.0 = Output Ddrb.0 = 1 Do Loop End 'end program Showe: Set Portb.0 Waitms 10 Reset Portb.0 Return
$regfile = "m8def.dat" $crystal = 8000000 Config Timer2 = Timer , Async = On , Prescale = 128 : Start Timer2 Enable Interrupts Enable Ovf2 On Ovf2 Showe Config Portb.0 = Output Ddrb.0 = 1 Do Loop End 'end program Showe: Set Portb.0 Waitms 10 Reset Portb.0 Return
دیدگاه