Re: 2313 output pin problem
Anderas Strodl <[email protected]> Tue, 23 Dec 2003 21:20:21 +0100
| Newsgroups | gmane.comp.hardware.avr.general |
|---|---|
| Message-ID | <[email protected]> |
Robert Baruch wrote: > Looking closely at the pin diagrams in figures 41 through 43 in the 2313 > manual, successful use of PB5-7 without blowing SPIEN could depend on > the setting of DDRB. Looking at the logic diagrams, it seems like if you > have > circuitry connected to the pin that considers a high-impedance input as > a 0, then you can probably get away with setting the direction as an > *input* pin. Then setting the pin's bit on PORTB to 0 results in > high-impedance, and setting it to 1 results in the internal pullup > transistor becoming active, which would look like a 1. > > Basically, having SPIEN at 0 disables the ability to use the pin as an > output for pins PB5, 6, and 7. 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. > In any case, the schematic I used is here: > http://www.bsdhome.com/avrdude/avrdude.pdf > > Basically, it has a buffer between the LPT and the device to be > programmed. No resistors on the outputs. Your programming circuit uses a 74367 buffer which is capable of sinking up to 16mA. I assume you are using a red LED which usually have a forwad voltage of 1.65. You have a 220 Ohms resistor for your LED. So the LED draws 15.2mA. I could imagine the voltage being higher than supposed due to the "high" current drawn by your LED. 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. > So since the programmer has a buffer directly driving the AVR pin, > there's no voltage divider anywhere, and the AVR gets programmed and > verified properly. 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 myself would use a jumper to connect one end of the LED either to +5V or to the AVR's SCK pin. A.Strodl