I'm hoping someone can help me solve this problem. I have an ATMEGA16L attached to a breadboard, and I am trying to send RS232 data (via software UART), to either the TX pin on the STK500 or the RX pin on the STK500 (which echoes the data to the terminal). The good news is that sending the data to the TX pin or the RX pin on the dev board works when I have the 10 pin ISP cable connected, and the serial cable plugged in! The bad news is that everything goes haywire when I unplug the ISP! The test program I wrote on the STK500 flashes the leds when data is received on the RX pin before it echoes the data to the terminal. When the ISP is plugged in, the leds are stable and only flash when I am sending data. When I unplug the ISP, the lights flash constantly, like there is data being sent across, when its not, and the data echoed is garbage.
I've attached a schematic and a picture of the breadboard. The program running on the ATMEGA16L sends a single character to across pin PD7 while PA0 is low (when the black button in the upper right is pressed).
Any theories on why this only works when the ISP is connected? Is the ISP supplying some extra voltage, or maybe providing some kind of voltage filtering? Maybe it's providing some extra grounding? I know I'm missing something simple here, but just can't figure out what it is. I'll be glad to try any suggestions, and let you all know what works.
If anyone is wondering why I'm using software UART on the ATMEGA16L, the reason is because I was using a AT90S2343, but I fried it by hooking up a 9v battery directly to it by mistake. I'm a novice user, and am learning pretty much by trial and error at this point. I had the same strange behavior with the AT90S2343, but at one point I got it to work by touching one of the ground wires! Even thought I'm a beginner, I don't think this would be a good design strategy.