Re: 2313 output pin problem

Robert Baruch <[email protected]> Tue, 23 Dec 2003 16:10:34 -0500
Newsgroups gmane.comp.hardware.avr.general
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anderas Strodl wrote:

| I do not think so, as i have a board working here where I use the upper
| 4 ports of PORTB as outputs (that include SCK, MOSI, MISO) and which is
| programmed via the SPI interface without causing any problems. I didn't
| change anythink at the fuse-bits.

What did you have DDRB set to? What circuitry do you have connected to
PB5-7?

| Try to disconnect your adapter from your PC's parallel port while
| leaving
| your target board connected and apply
| 5V to pin 1
| 0V to pin 6,8,18
| Now meassure the voltage at the SCK pin, if it is over 1.5V you have a
| problem.

The voltage was 0.25 V, which is below the zero logic threshold. I
should mention that I used an 'HC244 instead of a '367, because I had
one handy. The 'HC244 can source/sink up to 25 mA.

| Are your sure it is really properly programmed?
|
| Since you've mentioned the LED only does not work on MOSI and SCK pins
| I'm quite sure you have a programming problem.

I am absolutely, 100% sure it is programmed correctly. I added some code
after my original code to blink the LED, and it blinks on other pins.
Also remember that I set all the bits of DDRB and all the bits of PORTB
to the same value, and I also tried both PORTB=0 and PORTB=0xFF, so if
there were a programming problem, it would show up for all pins.

The fact that it only showed up for PB7 and PB5 implies that those pins
are special, which the logic diagrams in the datasheet show.

I also hand-verified the program by dumping the contents of the memory
and checking it against the dump given by avr-objdump, and they match.
So the AVR is definitely programmed properly.

- --Rob

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/6K9K3n80I35hhEsRAiC4AKCo5HojlZq+ZsfKLEa9FPL9jJGZDwCgr6Yu
ICTIi4hYuwU6gYeo1IZYge4=
=uG09
-----END PGP SIGNATURE-----