Connect with us

Strange ATmega16 operation

Discussion in 'Electronic Basics' started by nogoodinel, Feb 1, 2007.

Scroll to continue with content
  1. nogoodinel

    nogoodinel Guest

    Can you help me guys

    I made a circuit witch should control leds. Software on Atmega16 is
    keeping led on on the bin 1 (PB0 (XCK/T0)) and blinking led on the bin
    22 (PC0 (SCL)). Resistors before leds are 1k and Vcc is taken throw
    7805 regurator with condensator both sides. On AVR programming board
    everything goes good and leds on the board go *blink*, *blink* ...

    The problem: System does really strange things on my own made circuit.
    After turning power on or after reset both leds illuminates for
    something like second and after that "all the time on led" shuts down
    and "*blink* ,*blink* led" keeps on blinking but the frequency is much
    smaller than it should be.

    I have no idea about what is wrong. It would be nice if somebody could
    give me some guidance.

  2. nogoodinel

    nogoodinel Guest


    condensator means capacitor naturally.
  3. John Smith

    John Smith Guest

    I am copying from the ATMEGA16 datasheet:
    **The device is shipped with CKSEL = "0001" and SUT = "10". The default
    clock source setting is therefore the 1 MHz Internal RC Oscillator with
    longest startup time. This
    default setting ensures that all users can make their desired clock source
    setting using an In-System or Parallel Programmer.**

    You have to program the CKSEL fuse bits to set the clock options (external,
    internal clock etc)
    For more, see the "Clock Sources" section in the ATMEGA16 manual

  4. Jamie

    Jamie Guest

    make sure all of your un-used inputs are tied to something.
  5. nogoodinel

    nogoodinel Guest

    Thank you for your good advice. It seems that the problem is with this
    clock because I got it work (...for a while, but now I messed it up
    again). Must do that 1/0 tying with internal resistor also and
    hopefully all my concerns are far away. YEAH right.
  6. nogoodinel

    nogoodinel Guest

    The problem why I messed it up again was that any of the serial port
    bins on chip is not connected to anything. When interups where enabled
    in the chip the result in the function of my circuit was: OK for 1-2
    sec and then leds blinked at smaller frequency than they supposed to.
    It seems that the problem goes away after pluging the serial cabel to
    RX, DX and GND bins --->PC.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day