SwingeyP
Member
Can anyone help me with this one please.
Device = 16f877a
Every time I compile this I get the runtime error. Its only when I include the freqout line.
Regards - Paul
Code:
Dim data As Byte
Dim tonefreq As Word
TRISD = %11111111 'Set port D to input
'=============Main============
loop:
idle:
If PORTD.6 = 0 Then Goto idle 'tones are disabled, just idle
data = ShiftLeft(PORTD, 2)
data = data / 4 'Get the low 6 bits of Port D
tonefreq = LookUp(0x43, 0x47, 0x4d, 0x52, 0x58, 0x5f), data
FreqOut PORTB.1, tonefreq, 100
Goto loop
Device = 16f877a
Every time I compile this I get the runtime error. Its only when I include the freqout line.
Regards - Paul