Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20717

BASCOM-AVR : game : REPLY

$
0
0
hi,deanus ok , thanks for your information..i have make my project but it not perfect i see.and i don't know how to create the music in to ic...the game i call kiddie ride,usually for kid playing.. :D this is the project: $regfile = "m8def.dat" $crystal = 4000000 '$sim Dim Nilai As Byte Config Pinb.0 = Input 'this pin set 1coin Config Pinb.1 = Input 'this pin set 2coin Config Pinb.2 = Input 'this pin set time to output Config Pinb.3 = Input 'this pin set time to ouput Config Pinb.4 = Input 'this pin is wait coin coming in Config Pind.0 = Output Config Timer0 = Timer , Prescale = 1 On Timer0 Waktu1 Enable Interrupts Enable Timer0 Set Pinb.0 Set Pinb.1 Set Pinb.2 Set Pinb.3 Do Stop Timer0 If Pinb.0 = 0 And Pinb.1 = 1 And Pinb.2 = 0 And Pinb.3 = 1 Then Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Portd.0 Timer0 = 0 Start Timer0 Kembali: If Nilai < 3 Then Goto Kembali Reset Portd.0 End If If Pinb.0 = 0 And Pinb.1 = 1 And Pinb.2 = 1 And Pinb.3 = 0 Then Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Portd.0 Timer0 = 0 Start Timer0 Kembali1: If Nilai < 4 Then Goto Kembali1 Reset Portd.0 End If If Pinb.0 = 0 And Pinb.1 = 1 And Pinb.2 = 0 And Pinb.3 = 0 Then Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Portd.0 Timer0 = 0 Start Timer0 Kembali2: If Nilai < 5 Then Goto Kembali2 Reset Portd.0 End If If Pinb.0 = 1 And Pinb.1 = 0 And Pinb.2 = 0 And Pinb.3 = 1 Then Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Portd.0 Timer0 = 0 Start Timer0 Kembali3: If Nilai < 3 Then Goto Kembali3 Reset Portd.0 End If If Pinb.0 = 1 And Pinb.1 = 0 And Pinb.2 = 1 And Pinb.3 = 0 Then Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Portd.0 Timer0 = 0 Start Timer0 Kembali4: If Nilai < 4 Then Goto Kembali4 Reset Portd.0 End If If Pinb.0 = 1 And Pinb.1 = 0 And Pinb.2 = 0 And Pinb.3 = 0 Then Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Pinb.4 Bitwait Pinb.4 , Reset Waitms 500 Set Portd.0 Timer0 = 0 Start Timer0 Kembali5: If Nilai < 5 Then Goto Kembali5 Reset Portd.0 End If Loop End Waktu1: Incr Nilai Return "hope you can help me"thanks very much

Viewing all articles
Browse latest Browse all 20717

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>