The end of that tutorial will be a GameBoy-like device, playing a Frogger-Clone.

a video of it
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 110 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 118 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 123 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 173 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 173 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 173 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 173 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 173 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 173 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 175 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 175 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 208 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 292 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/main.php on line 292 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/config.php on line 36 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/config.php on line 37 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/lang.php on line 55 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/lang.php on line 55 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/lang.php on line 110 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/lang.php on line 110 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 201 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 201 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 216 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 216 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 231 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 232 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 232 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 233 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web218/a3/28/510129628/htdocs/border_html5.php on line 233

Well, here's the assembly instruction for the board I built: First, I needed 5V
DC current. You can't get that at the groceries, so I took a cheap 6V adapter,
got a "7805 Positive Volt Regulator" and built this:
C1
100μF
+6V(in)------+-||-+
| |
in| |
7805 []----+--GND
out| |
| |
+5V(out)-----+-||-+
C1
100μF
:ISP:
R1 ------------------------RESET
10kR / -----SCK
+5V-[]-+-----+-Reset::PC5 / ----MISO
| ---::::PC4 |/ ---MOSI
C1- ---::::PC3 ||/ GND---GND
47pF- *2 ---::::PC2 *1 |||
| | ---::::PC1 | |||
GND--/ V ---::::PC0 V |||
+5V-----------VCC:::AGND---GND |||
GND-----------GND:::AREF |||
-------XTAL1:AVCC---+5V |||
+-+--/ ----XTAL2::SCK------/ ||
C2 - | / ---:::MISO-------/ |
27pF- | | ---:::MOSI---------/
| | | ---::::---
GND---+ ^ | ---::::---
| Quarz | ^
C2= Y8MHz | ATmegaXX
27pF| | |
+-+-----/
*1: 100nF between AVCC + AGND, close to the controller
*2: 100nF between VCC + GND, close to the controller
DDRx |= (1 << p);DDRB |= (1 << 5);DDRB = 0xff;PORTx |= (1 << p);PORTx &= ~(1 << p);DDRB &= ~(1 << 5);PORTB |= (1 << 5);char IsBitHigh = PINx & (1 << p);
+---+
1|o o|0
3|o o|2
5|o o|4
7|o o|6
VCC|o o|GND
+---+
__-----__
/
| |
| ____ |
| |_ # |
| #| |
|__|_|_|__| R4
| | 100R
| +------[]----GND
VCC
// Blinky.c
#include <avr/io.h>
#include <util/delay.h>
int main(int argc, char* argv[])
{
short i;
// set PORTC, PIN0 for output
DDRC = 0x01;
for(;;)
{
for(i = 1; i <= 128; i*=2)
{
PORTC = i;
_delay_loop_2(30000);
}
for(i = 128; i > 1; i -= i/2)
{
PORTC = i;
_delay_loop_2(30000);
}
}
}
R2
___ 1kR
PIN--/ ---[]---GND
+----+
E|oo o|GND
<-|oo o|->
+----+
|
V
// Button.c
#include <avr/io.h>
// Key port - I have mine on PORTC
#define KEY_PIN PINC
#define KEY_DDR DDRC
#define KEY_PORT PORTC
// The pins for each direction
#define KEY_NULL -1
#define KEY_UP 0
#define KEY_LEFT 1
#define KEY_DOWN 2
#define KEY_RIGHT 3
#define KEY_ENTER 4
volatile char KEY = KEY_NULL;
volatile char KEY_VALID=0;
void HandleKeys(void)
{
if(KEY_VALID) return;
for (char i=0;i<5;i++)
{
if(i!= KEY && !(KEY_PIN & (1 << ;i)) )
{
KEY_VALID = 1;
KEY = i;
}
}
// Key has been released
if(!KEY_VALID && KEY!=KEY_NULL && (KEY_PIN & (1 << KEY)) )
KEY=KEY_NULL;
}
// Is Key up/down now?
char GetKeyState(char key)
{
return !(KEY_PIN & (1 << key) );
}
// whick key has changed to keydown
char GetKey(void)
{
char k;
if (KEY_VALID)
{
k = KEY;
KEY_VALID = 0;
}
else
k = KEY_NULL;
return k;
}
int main(int argc, char** argv)
{
// switch to input mode
KEY_DDR &= ~(KEY_LEFT|KEY_RIGHT|KEY_UP|KEY_DOWN|KEY_ENTER);
// enable pullup resistances
KEY_PORT|= (KEY_LEFT|KEY_RIGHT|KEY_UP|KEY_DOWN|KEY_ENTER);
for(;;)
{
HandleKeys();
switch(GetKey())
{
...
}
}
}
R2 LDR
1kR 1kR
+5V --[]------[]--- GND
|
V
ADC
Display: PB0o--oPA0
/RES-----------PB1o--oPA1
CS-------------PB2o--oPA2
A0-------------PB3o--oPA3
R/W------------PB4o--oPA4
E--------------PB5o--oPA5
PB6o--oPA6
+5V----+---(10kR)-. PB7o--oPA7
.--)--|100nF|-------- RESETo--oAREF
| '---------+----------VCCo--oGND------------+-GND
GND-+----|100nF|-' +--------GNDo--oAVCC-+-|100nf|-'
'+-+-----------+ +-+--XTAL1o--oPC7 '-----------+5V
| '--|27nF|-----+ | +XTAL2o--oPC6
| ,-[Quarz-8MHz]--+ | PD0o--oPC5 +-----+
| '----------+------+ PD1o--oPC4-------------|enter|
'----|27nF|--' PD2o--oPC3-------------|right|
PD3o--oPC2-------------|down |
PD4o--oPC1-------------|left |
PD5o--oPC0-------------|up |
PD6o--oPD7 |gnd |--(1kR)--GND
+-----+
Pins PD0 to PD7 connect to D0 to D7 of the display
On the Display:
A------VCC
K----.-GND
n.c.-+
GND--'
Vcc----VCC
GND----GND
D7-----PD7
.. ..
D0-----PD0
E------PB5
R/W----PB4
Vcc----VCC
A0-----PB3
/CS1---GND
/RES---PB1
GND----GND
GND----GND