Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
I can't give you advice on how that programmer works for C...But if you download Bascom-AVR demo, in the help file you will find a Sample Electronics programmer that is made with a DB25, 3x330 ohm resistors and a ribon with a connector like the one you are showing above. But be carefull, the programmer does not work on laptops (something related with the parralel port implementation...).
Sample Electronics submitted the simple cable programmer.They produce professional programmers too. This simple programmer you can make yourself within 10 minutes.What you need is a DB25 centronics male connector, a flat cable and a connector that can be connected to the target MCU board.The connections to make are as following: DB25 pin -> AVR pin 2 - [220 ohm resistor] - MOSI 4 - RESET 5 - [220 ohm resistor] - SCK 11 - [220 ohm resistor] - MISO 18-25 - GNDNote that 18-25 means pins 18,19,20,21,22,23,24 and 25You can use a small resistor of 100-220 ohm in series with the 2, 4 and 5 pins in order not to short circuit your LPT port in the event the MCU pins are high.It was tested without these resistors and no problems occured. Tip : when testing programmers etc. on the LPT it is best to buy an I/O card for your PC that has a LPT port. This way you don?t destroy your LPT port that is on the motherboard in the event you make a mistake!I received the following useful information:I have been having spurious success with the simple cable programmer from Sample Electronics for the AVR series.After resorting to hooking up the CRO I have figured it out (I think). When trying to identify the chip, no response on the MISO pin indicates that the Programming Enable command has not been correctly received by the target.The SCK line Mark/Space times were okay but it looked a bit sad with a slow rise time but a rapid fall time. So I initially tried to improve the rise time with a pull-up. No change ie still could not identify chip. I was about to add some buffers when I came across an Atmel app note for their serial programmer "During this first phase of the programming cycle, keeping the SCK line free from pulses is critical, as pulses will cause the target AVR to loose synchronization with the programmer. When synchronization is lost, the only means of regaining synchronization is to release the RESET line for more than 100ms."I have added a 100pF cap from SCK to GND and works first time every time now. The SCK rise time is still sad but there must have been enough noise to corrupt the initial command despite using a 600mm shielded cable.