Input Devices

This week I made a circuit with audio I/O. I re-designed the hello.mic.45 board for the attiny44.
  • Audio input with the following borrowed from the hello.mic.45 example
    • Power regulator
    • Bridge?
    • Used pins that worked with the ADC comparator matrix
  • Add an Audio Output from a timer counter comparator pin
    • Audio out through a high pass filter to remove DC
  • Add an LED on the one remaining pin
Raj said that this system of resistors and capacitors on the microphone is designed to prevent using an op-amp. I don't quite understand the functionality, and that made it difficult to troubleshoot. Adding it to the list of things to look into for next week.
project image Designing in EAGLE: Soldering:
I modified the hello.mic.45.c code to work with the attiny44 instead of the attiny45, using ADMUX to configure my pic input pins as PA3 and PA2 with 20x gain. Using hello.mic.45.py to monitor the mic, the tkinter window was just blank. After debugging the python script, I found that the script was hanging on the line byte4 = ord(ser.read()), suggesting a serial problem. The output of my serial pin looked like this:
Eventually I figured out that I had not set the serial pin PA1 as an output using the DDRA register. Fixing this made the the python program work. however, it's still not actually displaying the audio waveform(see below). I haven't had time to troubleshoot this yet.