2313 output pin problem
Robert Baruch <[email protected]> Mon, 22 Dec 2003 11:25:50 -0500
| Newsgroups | gmane.comp.hardware.avr.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I'm just starting out with the AVR series of uc's. I've successfully
built a programmer of the "alf" type, and verified that it works properly.
So here's my simple program:
void main(void)
{
DDRB = 0xff; // port b set to all outputs
PORTB = 0;
}
I have a 220-ohm resistor and an LED hooked up in series between VCC (5
volts) and PB7, which is also the SCK pin. I know the LED is connected
the right way, because it lights up during programming. So the above
program should drive PB7 to ground, thus lighting the LED.
But when I run the program, the LED doesn't light up. All the other port
B pins are at 0 volts, but PB7 is at 3.75 volts, almost as if the pin
were floating, which can't be right, or am I reading the data sheet wrong?
I also changed PORTB to 0xff and verified that all the pins are at 5 volts.
So what's wrong? I'd appreciate any help.
Thanks!
- --Rob
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/5xsO3n80I35hhEsRAnq1AJ9EdFzNZq0WUmV+mW6lwxbkTw95SQCeIz24
9mhZLGvoLCAgc739IWbmmbA=
=HPOv
-----END PGP SIGNATURE-----