$regfile = "M16def.dat" $crystal = 1000000 $baud = 9600 '--------------------------------------------------- Config Lcdpin = Pin , Db7 = Pina.7 , Db6 = Pina.6 , Db5 = Pina.5 , Db4 = Pina.4 , E = Pina.3 , Rs = Pina.2 Config Lcd = 16 * 2 '--------------------------------------------------- Dim A(10) As Byte , I As Byte , T As Byte , B As Byte , Receive As Byte '--------------------------------------------------- Enable Interrupts Enable Urxc On Urxc Receive_program '--------------------------------------------------- Config Pinb.0 = Input '--------------------------------------------------- Cls Home Lcd "salam" Wait 3 Cls '--------------------------------------------------- A(1) = 162 A(2) = 51 A(3) = 91 A(4) = 120 A(5) = 20 I = 1 '--------------------------------------------------- Do Delay If Pinb.0 = 1 Then Print "0x55" Waitms 5 Print A(i) Lcd A(i) Lcd " " Incr I Waitms 50 End If Loop Receive_program: B = Udr Input Receive If Receive = 0 Then Waitms 5 B = Udr Input Receive End If If Receive <> 0 Then Lcd Receive Waitms 50 End If Return End 'end program