Re: 2313 output pin problem

"Theodore A. Roth" <[email protected]> Mon, 22 Dec 2003 10:01:19 -0800 (PST)
Newsgroups gmane.comp.hardware.avr.general
Message-ID <[email protected]>

On Mon, 22 Dec 2003, Robert Baruch wrote:

> 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.

Is the ISP programmer still connected? If so, maybe it's trying to pull
up that the SCK pin and is stronger than your 2313.

Ted Roth