با سلام دوستان من دو برنامه فلاشر چشمک زن دارم برنمه1 و2 میخام برنامه یک همزمان با برنامه دو اجرا بشن کداشو گزاشتم چکار میشه کرد؟
برنامهیک:
برنامه دو:
برنامهیک:
کد:
$regfile = "m8def.dat" $crystal = 1000000 Config Portc = Output Config Portd = Output Config Portb = Output Do Reset Portd.2 Set Portd.0 Waitms 100 Reset Portd.0 Set Portd.1 Waitms 100 Reset Portd.1 Set Portd.2 Waitms 100 Loop
کد:
$regfile = "m8def.dat" $crystal = 1000000 Config Portc = Output Config Portd = Output Config Portb = Output Dim F1 As Byte Dim F2 As Byte Dim F3 As Byte Dim F4 As Byte Dim F5 As Byte Dim F6 As Byte Dim F7 As Byte Dim F8 As Byte Dim F9 As Byte Dim F10 As Byte Dim F11 As Byte Do For F1 = 1 To 25 Toggle Portd.3 Toggle Portd.4 Toggle Portd.5 Toggle Portd.6 Toggle Portd.7 Toggle Portb.0 Toggle Portc.0 Toggle Portc.1 Toggle Portc.2 Toggle Portc.3 Toggle Portc.4 Toggle Portc.5 Waitms 250 Next F1 For F2 = 1 To 25 Reset Portd.3 Reset Portd.4 Reset Portd.5 Reset Portd.6 Reset Portd.7 Reset Portb.0 Reset Portc.0 Reset Portc.1 Reset Portc.2 Reset Portc.3 Reset Portc.4 Reset Portc.5 Waitms 150 Set Portd.3 Set Portd.4 Waitms 200 Set Portd.5 Set Portd.6 Waitms 200 Set Portb.0 Set Portd.7 Waitms 200 Set Portc.0 Set Portc.1 Waitms 200 Set Portc.2 Set Portc.3 Waitms 200 Set Portc.4 Set Portc.5 Waitms 200 Reset Portd.3 Reset Portd.4 Waitms 100 Reset Portd.5 Reset Portd.6 Waitms 100 Reset Portd.7 Reset Portb.0 Waitms 100 Reset Portc.0 Reset Portc.1 Waitms 100 Reset Portc.2 Reset Portc.3 Waitms 100 Reset Portc.4 Reset Portc.5 Waitms 100 Next F2 Set Portd.3 Set Portd.4 Set Portd.5 Set Portd.6 Set Portd.7 Set Portb.0 Set Portc.0 Set Portc.1 Set Portc.2 Set Portc.3 Set Portc.4 Set Portc.5 For F3 = 1 To 3 For F4 = 1 To 50 Toggle Portd.3 Toggle Portd.4 Waitms 60 Next F4 For F5 = 1 To 50 Toggle Portd.5 Toggle Portd.6 Waitms 60 Next F5 For F6 = 1 To 50 Toggle Portd.7 Toggle Portb.0 Waitms 60 Next F6 For F7 = 1 To 50 Toggle Portc.0 Toggle Portc.1 Waitms 60 Next F7 For F8 = 1 To 50 Toggle Portc.2 Toggle Portc.3 Waitms 60 Next F8 For F9 = 1 To 50 Toggle Portc.4 Toggle Portc.5 Waitms 60 Next F9 Next F3 Loop
دیدگاه