Hello people,
I'm trying to watch a variable on a program but I cannot find a way
my code is:
and I'm trying to see the value of asd, but I cannot find it anywhere.
What are my options for such a problem?
Thank you!
I'm trying to watch a variable on a program but I cannot find a way
my code is:
- Code:
#ifndef F_CPU
#define F_CPU 16000000UL //clock speed is 16MHz
#endif
#include <avr/io.h>
#include <util/delay.h>
int asd = 0;
int main(void) //main starts
{
DDRD = DDRD | ( 1<<4) ; //Make pin 4 of port D as a output
DDRC = DDRC & ~(1<<5) ; // Make pin 5 of port C as a input
while (1) //initialize while loop
{
if(PINC & (1<<5) ) //if PIN5 of port C is high
{
PORTD = PORTD | ( 1<<4) ; //PIN4 of port D is high
asd = 54;
}
else //otherwise
{
PORTD = PORTD & ~( 1<<4) ; //PIN4 of port D will remain low
}
} // while loop ends
} //main end
and I'm trying to see the value of asd, but I cannot find it anywhere.
What are my options for such a problem?
Thank you!