Hello,

Following the thread above, the code below does not work unless the value of k is made a constant as in: SOUND PORTC.5,[115,120,113,118]. I have never been able to use a variable to steer outputs to a specific pin. Any ideas?


pic16f8783

'sound on pin k port c

TRISC= %00000000
k var byte


start:
k=5
SOUND PORTC.0[k],[115,120,113,118]
GOTO START



"I don't know, Marge. Trying is the first step towards failure."