Thanks a lot for the help! Yes, you're right, I have the GCC AVRstudio compiler. I tried that, but on my screen (after I put my code through), I only get a bunch of 0's outputting?
#include "defines.h"
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include "uart_lib.h"
/* Global variable to establish the stream information for the UART. */
FILE uart_str = FDEV_SETUP_STREAM(uart_putchar, uart_getchar, _FDEV_SETUP_RW);
/**********************************************************************/
int main(void) {
uint8_t c, i, delaycount, doneflag, abortflag;
uint16_t h;
/* Initialize the UART. */
uart_init();
/* Establish the default streams to use the uart. */
stdout = &uart_str;
stdin = &uart_str;
stderr = &uart_str;
/* Initialize the ADC (using pin ADC0) as an input pin. */
DDRA = 0x00;
PORTA = 0x00;
ADCSRA |= (1 << ADPS1) | (1 << ADPS0); /* Setting the prescalar to 8 so that the clock is between 50kHz and 250kHz (using a 1MHz default system frequency */
ADMUX |= (1 << REFS0);
/* An infinite loop to continuously display the hex value*/
while (1)
ADCSRA |= (1 << ADEN);
ADCSRA |= (1 << ADSC);
h= ADC;
printf("03X", h);
return (0); }