problem with atmega8 pin

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi,
i have a problem with one of the ports on my atmega8.
i made a board for programming it as described on linuxfocus.org (basic 5 wire parallel port programmer cable connected to a Veroboard containing few resistors and capacitors and a test led connected to pin5 of the portc like this

--- <+ LED -> ------ <1K resistor> ------

the problem is that when i upload .hex file in it (using avrdude, i get the ok code verification)
the pin 5 on PORTC wont strobe, although resistor connected to LED is a bit high for this circuit, light of the led when it glows connected to other pins is a bit dim, but still visible, so the problem is not in the value of the resistor)

testcode is standard led blinker:

DDRC = 0xFF;
...
for(;;)
{
PORTC=0xFF;
delay_ms(10000);
PORTC=0x00;
delay_ms(10000);
}
...

so, all pins are strobing (measured voltage changes with multimeter) except for pin 5, i looked at the spreadsheet for this uC, but it didnt mention any oddities on this pin.
i managed to blink the led when i shortcircuited pin with pin 4 (or any other) of the same port, but thats not it.
im banging my head over this for few hours, but don't see what could be the problem.

btw i checked solder connections, there are no short circuits, and connections are fine.

thanx!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did have a similar problem with an ATmega128...
Finally, it turned out to be a damaged pin...(fried, overcooked or something).
So, I think you should try another chip and see what happens.

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Disable JTAG fuse

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW: are you using TWI?
If so, then you can not use PORTC.5 :wink:

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

Last Edited: Fri. Jun 24, 2005 - 03:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PC4 and PC5 can be used as two-wire interface port. They are disconnected from the port if configured this way. Be sure to disable two-wire interface by clearing (0) TWEN in TWCR register.

Jörg.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW: Are you aware that your LED is supposed to blink @ 10 seconds ON, 10 sec. OFF?
Or...maybe you wanted @ 1 sec. ON, 1 sec. OFF?!? [i.e. 1000ms]

So, the idea is that for 10 sec. you will see nothing, your LED will be off.
ONLY after 10 sec. the LED will light...

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just wondering, where is the negative side of the batt. connected to?

I'll believe corporations
are people when Texas executes one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tubecut wrote:
Just wondering, where is the negative side of the batt. connected to?

To GND maybe :lol:

Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it is connected to the GND pin, several other wires lead to it, but it is in no way connected directly to the PC%
i know that it is used for TWI, but i dont use it, so it couldn't be the problem
now in the meantime, i remembered, when i was plugging the uC into the holder (i bought cheap one, ill know better next time...) that pin twisted a little, but i straightened and forgot it ever happened (autosuggestion i guess...) at that time i didnt believe that any problem could arise from that, but it comes that it is the only answer for this so far.
thanks guys for good will, i guess ill have to build some experience in this stuff a little :)