Why do I get an oscillator sound?

Discussion in 'Wireless & RF Design' started by testuserabcdef, Jan 23, 2017.

  1. testuserabcdef

    Thread Starter Member

    Jul 12, 2016
    118
    4
    This is my circuit:
    circuit.png

    The two boxes at the bottom can be ignored.

    I have hooked up an AT89C2051 to my own half-duplex transceiver. upon power up, the lines of the microcontroller are untouched except port 1 where it drives LEDs through shift registers (not shown). My microcontroller application right now is changing colours of RGB LEDs every few seconds. Visually, everything works, however when I use debug mode of the transceiver (by connecting pins 2 and 3 together on jumper sv2 and connecting JP1 to a speaker), it seems that no matter what I set the dip switches to, I always hear oscillations at the same speed as the lights are changing and the "click" happens right when the lights change, but I don't want to hear the "click click click".

    I tried suppressing the problem by adding a 1mH inductor in series with +ve end of the 5VDC regulated power supply (top left in diagram). I apologize for an inaccuracy, but the microcontrollers VCC pin is connected to the +ve end of the 5VDC power supply as well as other (not shown) digital components. All remaining components that are connected to "VCC" are connected to the other end of the 1mH inductor.

    One thing I can try is to program the transmitter control pin (P3.5) to be low, but will that solve the clicking problem?

    I want to be able to transmit and receive data wirelessly with this circuit, and if anyone can suggest me slight modifications, (such as changing a capacitor or resistor value) then I'd go for it

    Also, the crystal frequency is 20Mhz.
     
  2. MrSoftware

    Well-Known Member

    Oct 29, 2013
    1,012
    276
    Taking a complete guess here; what is normally playing on the speaker? If it's producing a steady tone, then maybe the processor stops generating audio during the time it is switching the lights, and you're hearing that break in audio output as a click?

    Can you put the audio output on the scope and see what the signal is actually doing (break in signal, Voltage spike, etc..)?
     
  3. testuserabcdef

    Thread Starter Member

    Jul 12, 2016
    118
    4
    I don't have any oscilloscope. and I'm trying to invent a data transceiver, not an audio one.
     
Loading...