{"id":1925,"date":"2023-03-21T17:12:37","date_gmt":"2023-03-21T16:12:37","guid":{"rendered":"https:\/\/www.kanda.com\/blog\/?p=1925"},"modified":"2023-07-04T10:26:00","modified_gmt":"2023-07-04T09:26:00","slug":"all-you-need-to-know-about-avr-isp-updi-jtag-pdi-and-tpi","status":"publish","type":"post","link":"https:\/\/www.kanda.com\/blog\/microcontrollers\/all-you-need-to-know-about-avr-isp-updi-jtag-pdi-and-tpi\/","title":{"rendered":"All You Need to Know About AVR ISP, UPDI, JTAG, PDI and TPI."},"content":{"rendered":"\n
AVR microcontrollers were first introduced almost 30 years ago and since then there have been a few changes, especially since Microchip absorbed Atmel. The AVR was one of the first microcontrollers to have onboard flash memory that could be electrically erased and reprogrammed and this enabled the introduction of In System Programming or ISP.<\/p>\n\n\nRead more: All You Need to Know About AVR ISP, UPDI, JTAG, PDI and TPI.<\/span><\/a>\n\n\n\n\n\n\n The first programming method is commonly known as ISP and is a 3-wire SPI protocol. Larger chips (40-pins or more) started to have a JTAG interface for debugging and this was adopted as a second programming method.<\/p>\n\n\n\n These were the sole programming methods until the ATxmega family came along. These introduced a combined debug and program method called PDI, which is a 2-wire interface.<\/p>\n\n\n\n As this combined debug and programming interface made for easier on-chip debug and 2 wire programming, a version of it was introduced for some standard AVR ATtiny microcontrollers, called Tiny Programming Interface or TPI.<\/p>\n\n\n\n Pretty quickly, TPI was replaced by UPDI, which is a single wire debug and programming method. All AVR chips now use UPDI but it has gone through several changes and not all UPDI interfaces are the same!<\/p>\n\n\n\n The first AVR In System Programming method is commonly known as ISP but is actually Serial Programming Interface, as it uses SPI protocol. This is a 3-wire synchronous protocol with separate clock, data in and data out lines, called SCK, MISO and MOSI.<\/p>\n\n\n\n For programming, the programmer is always the master and target AVR is always the slave, so MISO (Master In Slave Out) is input to programmer and MOSI (Master Out Slave In) is output from programmer.<\/p>\n\n\n\n Originally ATmel defined a 10-way header with lots of ground lines because they were worried about noise – don’t forget this was a very early ISP – but later recommended a smaller 6-way version. These are shown here.<\/p>\n\n\n\nHistory of AVR Programming Methods<\/h3>\n\n\n\n
ISP Interface<\/h2>\n\n\n\n