' ici les liaisons à effectuer sur le PIC-BASIC STUDENT ' P0 ' P1 ' P2 ' P4 ' P5 sur DATA SOMO via R ' P6 sur CLK SOMO via R ' P7 ' P8 ' P9 ' P10 ' P11 sur PUSH 4 up ' P12 sur PUSH 5 down ' P13 sur PUSH 6 test volume ' P14 ' P15 ' P16 ' P17 const device = 3B dim m as integer dim i as integer dim j as integer dim k as integer dim o as integer beep 9 set picbus high lcdinit cls locate 0,0 print "File 0000.AD4" locate 0,1 print "Press P4 ou P5" o=&hFFFF gosub 500 m=&h0000 10 if in(11)=0 then gosub 100 'Fichier suivant 20 if in(12)=0 then gosub 200 'Fichier precedant 30 if in(13)=0 then gosub 300 'test volume goto 10 100 m=m+1 if m>10 then m=10 o=m gosub 500 locate 5,0 print DEC(m,4,0) delay 1000 return 200 if m=0 then return m=m-1 o=m gosub 500 locate 5,0 print DEC(m,4,0) Delay 1000 return 300 o=&hFFF5 'volume sonore FFF0 à FFF7 500 'shiftout 6,5,1,o,16 'non equivalent !? 'return j=&h8000 out 6,0 delay 2 locate 0,1 for i=1 to 16 k = o AND j if k=0 then print "0" : out 5,0 else print "1" : out 5,1 end if out 6,1 j=j/2 out 6,0 out 5,0 next i out 6,1 delay 2 return