I had read all the documentation regarding the atmega328p but the programming part seemed a bit unclear to me. I know there are many cheap programmers but I just want to work on making my own one for my own understanding. I found schematics for the programmer in one of the Atmega applications note AVR910 where they used AT90s1200 for programming. On the other hand, I saw some links where they simply converted the RS232 into SPI. I haven't seen any documentation regarding it that the RS232 can also be used to give spi signals. If there is any documentation for the DB9 as this kindly share the links. Finally, I want to know the difference between the two programmers??? And which one should be preferred?? Kindly help me regarding that as I've been feeling quite confused regarding that.
Why not just use another Arduino as an ISP programmer?
Gammon's excellent tutorial: https://www.gammon.com.au/bootloader
"RS232" from an old-style PC/laptop serial port (DB9 connector) uses voltage levels of -12V and 12V, and will damage an Arduino unless you have a signal level adapter.
yes sir that is another way but I just want to do that to gain an intuition of what happens at the backend. Kindly help me if you have any info regarding that.
What do you mean by that?
I mean how the data is actually being transmitted. What does a programmer do in that case, as asked in the question? Does the Arduino ISP when used just converts the UART to SPI? Because A chip can be programmed through the spi port.
Programming data are transmitted to the target processor using the SPI protocol. It is fully described in the processor data sheet.
The Arduino ISP C/C++ code is open source, so study it carefully to learn how it works.
What about the RS232? How does that work as shown in the link
The electronic circuit changes the RS232 serial voltage levels from -12V to 12V to 0 to 5V, also inverting the bits, as required by the bit encoding.
It is not required unless you are using an old-fashioned DB9 serial port.
but there are no MOSI,MISO and SCK lines in the RS232. It only has the Tx Rx, then how have they used it at MOSI and MISO.
It only has the Tx Rx
Wrong. Several other serial port signals are available, and are used. Study the PonyProg2000 code and the complete definition of the PC RS232 serial port connector to learn how that works.
This is an image of the DB9 connector. I couldn't find the SPI pins and neither is there any documentation I have found yet regarding that. Is it possible that the software is generating the SPI signals? How does everything work? Could you please explain that I've seen a lot of documentation but could get any solid info? Could you provide me with the information on PonyProg??I shall be very thankful sir.
There are no SPI pins on the serial port. Other pins are used instead (DTR, CTS, etc.), and the proper SPI signals are created by "bit banging" those pins.
Download the source code from the PonyProg web site: PonyProg2000 - Download page
Thankyou sir. Means that the software is a special software and if I would try on using it to upload the arduino bootloader it wount work since it is UART based. I need a AVR ISP programmer as given in the datasheet AVR910??right.
You have to use PonyProg2000 with the serial port adapter under discussion.
Do you intend to use a PC or laptop with the old-fashioned DB9 serial port as an ISP programmer?
If not, there are plenty of other options, my favorite being this ISP programmer.
yes I want to use the ISP programmer. Just wondering how they were doing that as it seemed quite odd to me
Not odd at all.
Why buy a programmer, if you can build a programming adapter for with parts out of your junk box, and use the serial or printer port on the PC that you already own?
Actually most of the software like arduino and new programmers donot support such interface therefore I was a bit confused. Thankyou for the help.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.