نوشته شده توسط : hamid pursoleymani parizi

 

 

$regfile = "m8def.dat"
$crystal = 1000000
Config Portd = Input
Config Portc = Output
Config Portb = Output
Dim A As Byte
Do
If Pind.0 = 0 And Pind.1 = 0 Then

 

Portb.1 = 1 : Portb.2 = 0
Portc.0 = 0 : Portc.1 = 0 : Portc.2 = 0
Elseif Pind.0 = 1 And Pind.1 = 0 Then
Portb.1 = 1 : Portb.2 = 1
Portc.0 = 1 : Portc.1 = 1 : Portc.2 = 0
Portb.3 = 0
Elseif Pind.0 = 1 And Pind.1 = 1 Then

Portb.1 = 0 : Portb.2 = 0
Portc.0 = 0 : Portc.1 = 0 : Portc.2 = 0
Portb.3 = 1
Elseif Pind.0 = 0 And Pind.1 = 0 Then
Portb.1 = 0 : Portb.2 = 0
Portc.0 = 0 : Portc.1 = 0 : Portc.2 = 0
Portb.3 = 0
End If
Loop




تاریخ انتشار : جمعه 16 اسفند 1392 | نظرات ()
 
   
یکتا رایانه بزرگترین مرکز فروش لپ تاپ جنوب شرق.