#ifndef LEDCONFIG_H_ #define LEDCONFIG_H_ /* * ledconfig.template.h * * $Id: ledconfig.h,v 1.1.1.1 2008-02-24 04:58:34 phooky Exp $ */ #include // the column width of the display #define WIDTH 64 // the row height of the display #define HEIGHT 7 // the bits per pixel #define BPP 1 // ports and pins for shift register #define SR_LE_PORT PORTD #define SR_LE_BIT 4 #define SR_OE_PORT PORTD #define SR_OE_BIT 5 #define SR_CLK_PORT PORTD #define SR_CLK_BIT 3 #define SR_DAT_PORT PORTD #define SR_DAT_BIT 2 // bit - line - port // 0 - 1 - PD6 // 1 - 2 - PD7 // 2 - 3 - PB0 // 3 - 4 - PB1 // 4 - 5 - PB2 // 5 - 6 - PC0 // 6 - 7 - PC1 #define SET_COLS( col ) {\ PORTD = (PORTD & 0x3f) | ((col << 6) & 0xc0); \ PORTB = (PORTB & 0xf8) | ((col >> 2) & 0x07); \ PORTC = (PORTC & 0xfc) | ((col >> 5) & 0x03); \ } // line size, in bytes #define LINE_SIZE ((WIDTH+7) / 8) // bit plane size, in bytes #define BIT_PLANE_SIZE (LINE_SIZE * HEIGHT) // bit plane count #define BIT_PLANE_COUNT BPP // buffer size, in bytes #define BUF_SIZE (BIT_PLANE_SIZE * BIT_PLANE_COUNT) #endif // LEDCONFIG_H_