EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 60

no-image

EVB-PIC24

Manufacturer Part Number
EVB-PIC24
Description
Development Boards & Kits - PIC / DSPIC W3150A+EVAL BOARD BASED ON PIC24
Manufacturer
WIZnet
Datasheet

Specifications of EVB-PIC24

Rohs
yes
Product
Development Kits
Interface Type
RS-232
Data Bus Width
16 bit
Dimensions
50 mm x 40 mm
3.2.6.3.
Loopback UDP Program is a program that uses unicast datagram communication of UDP protocol. It
operates same as Loopback TCP Server/Client program does. UDP communication includes unicast
datagram communication and broadcast datagram communication, and basically supports 1-to-many
communication that is used for many destinations with one channel.
Loopback UDP program uses loopback_udp() and <Fig 3-16> shows processing procedure of
loopback_udp().
u_char * data_buf = TX_BUF
u_long destip = 0
u_int destport = 0
Declare & Initialize Local Variables
Check Socket Status
SOCK_CLOSED
loopback_udp()
getSn_SR(ch)
SOCK_UDP?
SOCK_INIT?
Loopback UDP
?
N
N
Y
Y
Y
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
len = getSn_RX_RSR(ch)
socket(ch,Sn_MR_UDP,port,0x00)
Get Recieved Size
Create a TCP Socket
RETURN
<Fig 3.16: loopback_udp()>
len > 0
N
Y
recvfrom(ch,data_buf,len,&destip,&destport)
sendto(ch,data_buf,len,destip,destport)
Send the Received Data
Receive the Data
50

Related parts for EVB-PIC24