EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 79

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
STATE_DHCP_LEASED state represents the network information is obtained and means that getIP_DHCP()
is done successfully. If network information is not obtained from DHCP Server during the waiting time for
„DHCP_WAIT_TIME x MAX_DHCP_RETRY‟ check_DHCP_state() sets DHCP_Timeout to 1. When
DHCP_Timeout is 1, getIP_DHCPS() returns failure after releasing the DHCP Timer.
When it failed to obtain network information from DHCP server, EVB B/D sets network configuration using
default network information or previous obtained network information.
<Table 3-35> is a definition of State, Timeout , and Retry Count of DHCP Client.
At getIP_DHCP(),„DHCP_XID‟ is variable to set up xid Field of DHCP message in <Fig 3.26: DHCP Message
Format>, it must be unique and maintained the same value until Lease Time of network information is
expired. DHCP_XID is fixed with „0x12345678‟ on here, but it‟s recommended to use random value.
Be advised to set Source IP Address as „0.0.0.0.‟ when initializing iinChip™ for communication with DHCP
server. You can use any IP address to set Source IP address of iinChip™ but using „0.0.0.0‟ is better
because „0.0.0.0‟ corresponds to Class A in IPv4 addressing and it‟s a Null IP address that is not actually
used. For this reason, there is no chance for collision with other network.
For DHCP server to transmit UDP broadcast packet, note that Flag field MSB of DHCP message must be set
1. Refer to <Fig 3.26: DHCP Message Format>.
<Table 3-36> is a part of code that sets up Flag field
#define STATE_DHCP_DISCOVER 1
#define STATE_DHCP_REQUEST 2
#define STATE_DHCP_LEASED
#define STATE_DHCP_REREQUEST 4
#define STATE_DHCP_RELEASE 5
#define MAX_DHCP_RETRY
#define DHCP_WAIT_TIME
Define
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
<Table 3-34: DHCP Client State & Timeout Definition>
3
3
5
DISCOVERY Transmission
OFFER Receiving & REQUEST Transmission
ACK Receiving, Acquiring Network Information
After obtaining Network Information, REQUEST
Retransmission
RELEASE Transmission
Number of Same DHCP Message Transmission, 3
times
Waiting time for receiving DHCP Message, 5 sec.
Description
69

Related parts for EVB-PIC24