Ok' I'm working my way through this version using the 16F873A, but I've hit a small issue...
I have set port A to all inputs...
the PIC simply ignores any input on RA2, but more confusingly, it runs each pattern once in sequence, ie it cycles through the patterns as if the button is being pressed, so swcount must in some way be changing...
Code:
Pot PORTA.1,scale,D ;used to read value from 10k pot and set the speed
read patt[swcount],steps ;read the first value of the selected patter and place it in the variable steps
for C = 1 to steps ;for / next loop
READ PATT[SWCOUNT]+ C,PORTB ;reads the step value for selected pattern and send it to PORTB
PAUSE D ;delay for speed
NEXT
GOTO MAIN
Bookmarks