/*************************************************************************** * Copyright (C) 03/2010 by Olaf Rempel * * razzor@kopf-tisch.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; version 2 of the License, * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include #include #define F_CPU 8000000 #include #include "6x8_vertikal_LSB_1.h" #define nop() asm volatile ("nop") #define nCLEAR PB0 #define RCLK PB1 #define nOE PB2 #define MOSI PB3 #define MISO PB3 #define SCK PB5 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) static const char text[] = " <<>> "; /* scrollbuffer */ static volatile uint8_t data[32]; static volatile uint8_t offset; void setRow(uint8_t row) { uint8_t i; volatile uint8_t *p = data + offset + 19; row = (1 << row); /* bit-banging spi, 20 cols */ for (i = 0; i < 20; i++) { PORTB &= ~(1<