Hi Malc
Assuming your PIC doesnt need to do anything else until the next beat then wait for the beat to disappear
Code:
music:
read patt[swcount],steps ;read the first value of the selected patter and place it in the variable steps
READ PATT[SWCOUNT]+ C,PORTB ;reads the step value for selected pattern and send it to PORTB
If switch2=1 then C=C+1
pause 10
If C=steps then C=1
****** add a bit here ******
goto music:
Add these lines at the point shown or if you need to update the display first then add the after you have updated the display.
Code:
While Switch2=1 ' beat signal is still high
pause 1 ' short pause
Wend ' its gone low now so we can carry on
Hope that helps
Bookmarks