[From QnA] WIZ220web(W5300) LCD cmd prob


#1

This post came from QnA of WIZnet website

Hi WIZnet,

we working with Wiz200web code only for UDP mode. we are facing the problem whenever we are using LCD commands in between the code.

for ex: case SOCK_CLOSED: // CLOSED
close(Sock); // close the SOCKET
socket(Sock,Sn_MR_UDP,Port,0); // open the SOCKET with UDP mode
break;

for this case if we add LCD commands to check out whether it is executing this case or not.

for ex: case SOCK_CLOSED: // CLOSED
close(Sock); // close the SOCKET
resp++;
lcd_gotoxy(10,1);
lcd_puts(itoa(resp,buffer,10));
socket(Sock,Sn_MR_UDP,Port,0); // open the SOCKET with UDP mode
break;

after adding LCD commands everything is getting struck we are not getting any response. what would be the reason if we add LCD commands anywhere in the program, it is getting struck.

one more query what is the need of close(sock), is it necessary. everytime we need to open the socket, send the command to client and close the socket, instead of this we can comment the close() function…
waiting for your reply…

thanks


#2

Dear customer,

Thanks for your interest in w5300.
In case of UDP:
W5300 operate SOCK_CLOSED status after reset status execute only once.
The UDP mode of W5300 doesn’t use the connection operation and Sn_SR of UDP operates only as SOCK_UDP except for reset status.
You can’t use it you wish.
If you operate TCP mode, you can use it you wish.
Thanks,

WIZnet