SX/B Example: 8-bit ADC
ellizard
Posts: 106
HI everybody
I tried to search in the forum for informations about the correctness of the 8-bit ADC example in the help of the sx editor, but found none.
I'm trying to relate a sound level to led intensity and for determining the sound level from an operational output (audio level 0-5 volt).
For starting i loaded the example in the help file but it give me this error:
at line 45 (temp2 VAR Byte) error 8, pass 1: invalid parameter "Byte"
I'm trying to figure out wath's the error is, but in the SX developement manual in the error list this message is not presenteand i could not figure whi it give me such an error in a variable declaration.
Of course I'm not an SX expert, I'm a SX novice and trying to learn the whole trough copy and modify the programs to try understanding the principles behind,
Also I'm not sure (the manual and the other SX books i have are a bit dated and no reference or explanations are given for SXBasic) of the amount of variables i can use with the SX.
I also found a mistype in the line 92 (IF temp3.0 = 1 THEN ' if unknown), wich i believe should be (IF temp2.0 = 1 THEN ' if unknown).
At the moment i feel lost, i tryed the adc vp but at my level it is too difficult to understand how to make them work in my environment, tough i think to understand the concept of the vp's.
thank for any suggestion
regards
Stefano
I tried to search in the forum for informations about the correctness of the 8-bit ADC example in the help of the sx editor, but found none.
I'm trying to relate a sound level to led intensity and for determining the sound level from an operational output (audio level 0-5 volt).
For starting i loaded the example in the help file but it give me this error:
at line 45 (temp2 VAR Byte) error 8, pass 1: invalid parameter "Byte"
I'm trying to figure out wath's the error is, but in the SX developement manual in the error list this message is not presenteand i could not figure whi it give me such an error in a variable declaration.
Of course I'm not an SX expert, I'm a SX novice and trying to learn the whole trough copy and modify the programs to try understanding the principles behind,
Also I'm not sure (the manual and the other SX books i have are a bit dated and no reference or explanations are given for SXBasic) of the amount of variables i can use with the SX.
I also found a mistype in the line 92 (IF temp3.0 = 1 THEN ' if unknown), wich i believe should be (IF temp2.0 = 1 THEN ' if unknown).
At the moment i feel lost, i tryed the adc vp but at my level it is too difficult to understand how to make them work in my environment, tough i think to understand the concept of the vp's.
thank for any suggestion
regards
Stefano
Comments
Do you have the latest version of the help file? -- there was an error that sneaked into that example (my fault) but it had nothing to do with variable declarations.· I've attached the newest version of the ADC8.SXB project; make sure that you have version 1.42.01 of the compiler,·you can get that from the sticky thread here:
http://forums.parallax.com/showthread.php?p=517621
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
the answers are ligthing
many thanks for the immediate reply
Stefano
P.S. I'll keep you informed of the progress of my work.
hope to present it in the project forum.