Its alive (STK500)

After many attempts to make the Atmel STK500 board work I finally got it running.

With AVR Studio 4.18 and WinAvr 20100110, the first program was made and tested on the STK500.

This should be the easiest setup there is, well there are some catches.

Atmel ATMega163

The support has been dropped for the ATMega163, and this is the CPU that is delivered with the STK500. Luckily Version 4 of the AVR studio is still supporting the CPU. There are however several gotchas before you can make it work on a windows 10 x64 machine.

Avr Studio 4

The Avr studio works but only after you modify a dll in the WinAvr directory. if you need it google for it as that information will be more relevant then what you find here. Avr studio demanded that I upgraded my STK500 with new firmware. 

STK500 Firmware

I was foolish to perform the upgrade with an USB to RS-232, and yes I bricked it. luckily my machine has a real RS-232 port and with this port I was able to upgrade the firmware of the STK500.

First running program:

#include <avr/io.h> //standard include for ATMega16

int main(void)
{
DDRB=0xff; //PORTB as OUTPUT
PORTB=0xF0; //All pins of PORTB LOW

DDRD=0x0; //PORTD as Input

while(1)
{
  PORTB = PIND;
}

return 0;
}

Next step will be adding the interrupt routine on the port, if this is possible other wise polling will be the best option.