
Originally Posted by
Travin77
I do a couple of questions for you, in your code you wrote, you have this:
Lookup dtmf-"0",[%10101001,....... My question is what is -"0" for?
It's a trick !?!
You have:
an ASCII-character (a digit "0"..."9") inside the variable "dtmf"
You want to get:
a bitpattern for the isd-chip.
Solution:
I used the lookup-command to index an bit-pattern. If I subtract the numerical äquivalent of "0" (IMHO 048 dezimal) from the ASCII-character in dtmf, I get an index-number 0..9. The lookup-command gets the bitpattern out of the list (10 patterns) and put it into the portC.

Originally Posted by
Travin77
Also,
dtmf = 0:dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3
LookUp dtmf,["_1234567890*#"],dtmf how does the lookup table know which number has been decoded by using this sequence: dtmf.0=DT0:dtmf.1=DT1:dtmf.2=DT2:dtmf.3=DT3
Travin
Read it like:
Clear all bits in dtmf
Get the bit out out DT0 and put it into dtmf.0
Get the bit out out DT1 and put it into dtmf.1
Get the bit out out DT2 and put it into dtmf.2
Get the bit out out DT3 and put it into dtmf.3
So, the 4 bits are puzzled to the variable ! (index-number)
The lookup-command gets an ASCII-character for this number and stores it into the variable.
You love to work with ASCII-characters. It's not bad, but you have to convert sometimes from index-number to ASCII-character and back.
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Bookmarks