Watchout for duplicate pins for the same port! The ATtiny841 has TXD0 and RXD0 duplicated and the bootloader will only work for one pair!
Programming Using USBasp
For no crystal internal osc and 5V VCC we used these settings:
Programming using USBasp and Arduino ICD “Burn bootloader” gave a confusing single message about setting SCK speed, but on the first attempt it said programming complete. The clock speed message felt like a possible error though and subsequent attempts to burn bootloader resulted in lots of error messages. However cycling he power and trying again would generate just the single clock speed orange text message so had to take a leap of faith that meant all was OK and solder the part into circuit (it was OK).
In circuit programming
Used Arduino UNO with uC removed with TX, RX, RESET and GND connected to our ATtiny PCB
Initially tried to connect to TX and RX on pins PA7 and PB2, but it turns out this device has UART0 duplicated and the correct pins to connect to are PA1 and PA2.
Other example in circuit programming schematic using FTDI cable: