/*
Filename: inComplOut
Author: George Howard
Date: 20/02/2024
Description: This program displays on the LEDs what the compliment of the value of the switches are.
*/
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
unsigned char switches;
DDRC = 0x00; // Port C pins configured as input
DDRA = 0xFF; // Port A pins configured as output
PORTC = 0xFF; // Enabling the pull-up resistors
while(1)
{
switches = ~PINC;
PORTA = switches;
}
return 0;
}