I'm new to the world of AVR development, but quite ok with microcontrollers, programming and electronics. [oh, btw, I'm a student hobbyist :D]
I wanted to build a simple PPPD to program an AtMega8 and an AtMega128 [I have an eval board for the atmega8 made by a friend and am still waiting for the mega128 ic's]. I decided to go with the simple wires/resistors programmer, but added an HEF4050 buffer [taking power from the target] to make sure that if I had problems and shorts on the side of the target I would fry the 4050 instead of my parallel port. Also added R-C filters after the buffer to avoid ringing and stuff.
When I try to download my first program using PonyProg I get the message "Device missing or unknown device (-24)". The same happens when I try to read the program already in flash [board was used in other projects before I got it].
Anyone has any idea what the problem can be? Anyone can help me?
1: Target has an 11.0592MHz crystal, oscillating reliably [observed on scope].
2: Lines from buffer to RST, MOSI and SCK have a rise time around 1-2uS.
3: Line from buffer into PC [from MISO] has a rise time of about 5uS or less [maybe cable is too long,
60cm or series resistance too high].
4: Series resistors on parallel port are 4k7 on outputs from PC and 1k on input to PC [reduced resistance to decrease rise-time].
5: All lines tested with 80kHz square wave as input. Outputs are all acceptable square waves with slightly rounded edges.
6: PonyProg is running in AVR ISP I/O mode, bus speed set to SLOW. none of the lines is inverted
7: Waveforms observed during programming attempt [very approximate since I have an old analogue scope and it all happens so fast] are
-> approx 20mS on, 20mS off pulses on reset line
-> occasional narrow pulses on SCK line, approx 1-2mS
-> slightly wider pulses, indeterminate width but still much narrower than the reset pulses on MOSI and MISO
Please help me if possible! I always find the "downloading for the first time" a little problematic with microcontrollers! [just like "setting up the first project" :evil: ]
Thanks for any feedback!