من یه مدار کالر آی دی می خوام بسازم با HT9032D .
قسمت Ring Detection درست کار می کنه ، اما هیچ دیتایی با میکرو نمیتونم بگیرم.برنامه زیر فقط برای تست دریافته.
اینم شماتیک:

اینم نمونه کد:
$regfile = "m8def.dat"
$crystal = 11059200
$baud = 1200
'$sim
Config Portd.3 = Output 'PWDN
Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0
Config Lcd = 16 * 2
Cursor Off
Cls
Config Watchdog = 16
Config Int0 = Falling
Enable Int0
On Int0 Tell_input
Enable Interrupts
Reset Pwdn
Do
Loop
End
Tell_input:
Cls
Lcd "Ringing"
Do
For I = 1 To 2
For J = 1 To 16
Locate I , J
S = Waitkey()
Lcd S
Next J
Next I
Lcd S
Loop
return
قسمت Ring Detection درست کار می کنه ، اما هیچ دیتایی با میکرو نمیتونم بگیرم.برنامه زیر فقط برای تست دریافته.
اینم شماتیک:

اینم نمونه کد:
$regfile = "m8def.dat"
$crystal = 11059200
$baud = 1200
'$sim
Config Portd.3 = Output 'PWDN
Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0
Config Lcd = 16 * 2
Cursor Off
Cls
Config Watchdog = 16
Config Int0 = Falling
Enable Int0
On Int0 Tell_input
Enable Interrupts
Reset Pwdn
Do
Loop
End
Tell_input:
Cls
Lcd "Ringing"
Do
For I = 1 To 2
For J = 1 To 16
Locate I , J
S = Waitkey()
Lcd S
Next J
Next I
Lcd S
Loop
return
دیدگاه