Sign In

Vitual Terminal Of Proteus Is Showing Nothing

Sukhada Naik sukhada2908naik@gmail.com India

Hardware: Atmega32 Running On Frequency Of 16mhz Software: C Project Using Atmel Studio 6

We will be giving temperature sensors lm35,lm335 as input to adc of atmega 32. we designed the schematic and executed it on proteus. but the virtual terminal is not showing output. I am attaching dsn file. pls see and help us with it .help us with it

Images

vitual terminal of proteus is showing nothing

Program

#include <avr/io.h>

#include<util/delay.h>

void UART_transmit(unsigned char data)
{
	while(!(UCSRA & (1<<UDRE)));
	UDR=data;
}

void adc_getdata(void)
{
	unsigned int temp;
	unsigned char ch=0;
	while(1)
	{
		for(ch=0;ch<8;ch++)
		{
			ADMUX=0x00+ch;  // Selecting Channels
			ADCSRA=0xE7;     // ADC free running mode, 128 prescaling division factor
			temp=(ADC)*(48);
			temp=temp/10;
			temp=temp-2280;
			temp=temp/10;
			_delay_us(1000);
			UART_transmit(ch+'0'); // Sending channel number for synchronization
			_delay_ms(10);
			UART_transmit(temp);   // Sending temperature value
			_delay_ms(1000);
		}
	}
}

int main(void)
{

	DDRA=0x00;
	PORTA=0x00;

	UCSRA=0;
	UCSRB=1<<TXEN; // UART transmit enable
	UCSRC=1<<URSEL | 1<<UCSZ1 | 1<<UCSZ0;  // 8 data bit, a stop, none parity
	UBRRH=0;
	UBRRL=103; // for 9600 baud at 16MHz

	adc_getdata();

	return 0;

}

Replies

R Avinash Gupta
2017-05-07 06:58:24
Right click on ATmega32 and click "Edit Properties", a dialog should open. Upload the screenshoot of that dialog.

Post a reply to Sukhada Naik

Think you can help Sukhada Naik ? Then post your thoughts that might help Sukhada Naik. You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.