tahertinu
Member level 4
- Joined
- Jun 11, 2011
- Messages
- 74
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Ahmedabad
- Activity points
- 1,752
Good afternoon to all my dear friends.
Here i want to share my problem with you.
I am working on a WiFi server project on ATmega16 controller. I have purchased this WiFi-UART module
I have tested the sample server on Arduino board as per the given test file.
now i want to convert the same Arduino code to ATmega16 avr studio. I have wrote the same code in AVRStudio. but unfortunately it is not working.
here is the datasheet of module.
here is my AVR Studio code:
Please If anybody has worked on such project and same module do help me.
Here i want to share my problem with you.
I am working on a WiFi server project on ATmega16 controller. I have purchased this WiFi-UART module
I have tested the sample server on Arduino board as per the given test file.
now i want to convert the same Arduino code to ATmega16 avr studio. I have wrote the same code in AVRStudio. but unfortunately it is not working.
here is the datasheet of module.
here is my AVR Studio code:
Code:
int main()
{
//Varriable Declaration
char ch;
unsigned int currentLineIsBlank=1;
/*First Initialize the USART with baud rate = 19200bps*/
uart_init();
while(1)
{
ch=USARTReadChar();
if(ch=='\n'&¤tLineIsBlank)
{
USART_putstring("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<center><h1>Hello World!! I am Taher Kawantwala</h1></center>");
USARTWriteChar(0x0D);
break;
}
if(ch=='\n')
{
currentLineIsBlank=1;
}
else if(ch=='\r')
{
currentLineIsBlank=0;
}
}
}