Microchip ATmega168PB Xplained Mini

ATmega168PB Xplained Mini

Sample Firmware

  • 8led_1hz.hex: Example firmware for ATmega168P/PB

References

Program ATmega168PB (USB)

To program the ATmega168PB of the ATmega168PB Xplained Mini using its built-in programmer, hook up the Xplained Mini micro-USB port to any of the USB Type-A ports on the PLT.

YAML test plans

  • atmega168pb-XPmini-erase.yaml: Test plan to erase ATmega168PB over USB

Test plan to erase ATmega168PB over USB
title: "Erase ATmega168PB through USB"
suite:
- ident: ERASE
  title: Erase ATmega168PB
  steps:
  - command: erase AVRATmega168PB_XPM
  • atmega168pb-XPmini-program.yaml: Test plan to program ATmega168PB over USB

title: "Program ATmega168PB through USB"
suite:
- ident: PROGRAM
  title: Program ATmega168PB
  steps:
  - command: program AVRATmega168PB_XPM 8led_1hz.hex

Program ATmega168PB (PICkit4)

To connect the ATmega168PB of the ATmega168PB Xplained Mini over ISP with a PICkit4 programmer, hook up the Xplained Mini ISP connector to the PICkit4, and hook up the Xplained Mini micro-USB port to any of the USB Type-A ports on the PLT.

ATmega168P Xplained Mini ISP - PICkit4 connection

PICkit4 Pin

PICkit4 Signal

AVR Function

ISP Pin

AVR Signal

1

n.c.

2

VTG

VCC

2

Vcc

3

GND

GND

6

GND

4

MISO

MISO

1

PB4

5

SCK

SCK

3

PB5

6

nRESET

RESET

5

PC6

7

MOSI

MOSI

4

PB3

8

n.c.

YAML test plans

Test plan to erase ATmega168PB over USB
title: "Erase ATmega168PB through PICkit4"
suite:
- ident: ERASE
  title: Erase ATmega168PB
  steps:
  - command: erase AVRATmega168PB_PK4
Test plan to program ATmega168PB over USB
title: "Program ATmega168PB through PICkit4"
suite:
- ident: PROGRAM
  title: Program ATmega168PB
  steps:
  - command: program AVRATmega168PB_PK4 8led_1hz.hex

Program ATmega168PB (ISP)

To program the ATmega168PB of the ATmega168PB Xplained Mini over ISP over ISP with the built-in JTAG port of the PLT, hook up the Xplained Mini ISP connector JTAG signals of the PLT.

ATmega168P Xplained Mini ISP - PLT connection

PLT-200A JTAG pin

PLT Signal

AVR Function

ISP Pin

AVR Signal

1

JTAG_VCC

VCC

2

Vcc

2

JTAG_TMS

RESET

5

PC6

3

GND

GND

6

GND

4

JTAG_TCK

SCK

3

PB5

6

JTAG_TDO

MISO

1

PB4

8

JTAG_TDI

MOSI

4

PB3

YAML test plans

  • atmega168pb-erase.yaml: Test plan to erase ATmega168PB

Test plan to erase ATmega168PB
title: "Erase ATmega168PB through ISP"
suite:
- ident: POWER
  title: Power ON
  steps:
  - command: power JTAG on
  - command: sleepms 500
- ident: ERASE
  title: Erase ATmega168PB
  steps:
  - command: erase AVRATmega168PB_ISP
- ident: TEARDOWN
  title: Power off
  steps:
  - command: power off
  • atmega168pb-program.yaml: Test plan to program ATmega168PB

Test plan to program ATmega168PB
title: "Program ATmega168PB through ISP"
suite:
- ident: POWER
  title: Power ON
  steps:
  - command: power JTAG on
  - command: sleepms 500
- ident: PROGRAM
  title: Program ATmega168PB
  steps:
  - command: program AVRATmega168PB_ISP 8led_1hz.hex
- ident: TEARDOWN
  title: Power off
  steps:
  - command: power off