#include "setup.h"
#define DELAY 100
#define MAX_COLS 8
#define ROW_ACTIVE_MASK(i) (~(0x01 << (i)))
void time_delay(void);
int main()
{
DDRF = 0xFF;
DDRK = 0xFF;
// each containing values to activate columns to display Display Character B
const uint8_t pattern_bitmap[MAX_COLS] = {0x1C, 0x24, 0x24, 0x1C, 0x1C, 0x24, 0x24, 0x1C};
uint8_t i;
while (1)
{
for (i = 0; i < MAX_COLS; i++)
{
PORTK = ROW_ACTIVE_MASK(i);
PORTF = pattern_bitmap[i];
time_delay();
PORTF = 0x00;
}
}
}
void time_delay(void)
{
volatile uint32_t d = DELAY;
while (d-- > 0);
}