A microphone produces a voltage when it receives a sound input. When put through amplifying circuit the signal is increased to a level that a PICAXE can use to detect when sound is present.
Read an amplified sound level
This program will read the output voltage of a microphone amplifier connected to analogue input pin C.0 and report the value read in the 'b1' variable. The voltage output from the amplifier must be between 0V and V+.
- Code Example:
main: readadc C.0, b1 ; Read the amplifier output analogue value
debug ; Display the value
pause 1000 ; Wait a while
goto main ; Repeat
Submit an Example
A microphone with an amplifier circuit may be connected directly to the generic terminal block create module.
Submit Your Own Code!
You must be logged in to submit code examples. Login now.