doc0943 - AVR910 In-System Programming Features Complete...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
AVR910: In-System Programming Features Complete In-System Programming Solution for AVR Microcontrollers Covers All AVR Microcontrollers with In-System Programming Support Reprogram Both Data Flash and Parameter EEPROM Memories Complete Schematics for Low-cost In-System Programmer Simple Three-wire SPI Programming Interface Introduction In-System Programming allows programming and reprogramming of any AVR micro- controller positioned inside the end system. Using a simple Three-wire SPI interface, the In-System Programmer communicates serially with the AVR microcontroller, reprogramming all non-volatile memories on the chip. In-System Programming eliminates the physical removal of chips from the system. This will save time, and money, both during development in the lab, and when updat- ing the software or parameters in the field. This application note shows how to design the system to support In-System Program- ming. It also shows how a low-cost In-System Programmer can be made, that will allow the target AVR microcontroller to be programmed from any PC equipped with a regular 9-pin serial port. Alternatively, the entire In-System Programmer can be built into the system allowing it to reprogram itself. The Programming Interface For In-System Programming, the programmer is connected to the target using as few wires as possible. To program any AVR microcontroller in any target system, a simple Six-wire interface is used to connect the programmer to the target PCB. Figure 1 below shows the connections needed. The Serial Peripheral Interface (SPI) consists of three wires: Serial ClocK (SCK), Mas- ter In – Slave Out (MISO) and Master Out – Slave In (MOSI). When programming the AVR, the In-System Programmer always operate as the Master, and the target system always operate as the Slave. The In-System Programmer (Master) provides the clock for the communication on the SCK Line. Each pulse on the SCK Line transfers one bit from the Programmer (Mas- ter) to the Target (Slave) on the Master Out – Slave In (MOSI) line. Simultaneously, each pulse on the SCK Line transfers one bit from the target (Slave) to the Program- mer (Master) on the Master In – Slave Out (MISO) line. 8-bit RISC Microcontroller Application Note Rev. 0943E–AVR–08/08
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 0943E–AVR–08/08 AVR910 Figure 1. Six-wire Connection Between Programmer and Target System To assure proper communication on the three SPI lines, it is necessary to connect ground on the programmer to ground on the target (GND). To enter and stay in Serial Programming mode, the AVR microcontroller reset line has to be kept active (low). Also, to perform a Chip Erase, the Reset has to be pulsed to end the Chip Erase cycle. To ease the programming task, it is preferred to let the programmer take control of the tar- get microcontroller reset line to automate this process using a fourth control line (Reset).
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern