Hi,
Thanks for your reply. First things is for currently, I'm usign Codewarrior v3.1, so may be in your version it can be compile. By the way, this is not the problem. For the pass few days, I'm trying for include the LCD display at output for when select the LED bar in the webpage, then the LED will light up on the board and as well the LCD will display which LED are lighten up. This can be done with no error. However, I've try to reduce the code in the "main loop", then the LCD command that you've possed will be function.
I've disable some pervious function that I've posted in the forum, and found out the IP value that shows in LCD are not same as defined. The value shows is, when in Hex is F233, and when I want to change to Dec value "change to %d", then the value is -3533. What can I do to display the actual value of the IP address? Did the program that I've modified have any mistake? Below are the program been modified:-
void main(void)
{
//main() variable list
INT16 len;
char Buff[32];
/*
* Step 1: Intialize CRG, SCI, EMAC, and EPHY
* Main Loop: Process Recieved Packets
*
*
* NOTE.- THIS EXAMPLE IS BUILD WITH THE FOLLOWING CONFIGURATIONS (see ne64config.h)*
*
* WORD_ACCESS 1 - use word access
* ZERO_COPY 1 - use zero copy
* RX_POLL_MODE 0 - use buffer interrupts
*/
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
Indication(TRUE);
// Set our network information. This is for static configuration.
/* IP address */
localmachine.localip = *((UINT32 *)ip_address);
/* Default gateway */
localmachine.defgw = *((UINT32 *)ip_gateway);
/* Subnet mask */
localmachine.netmask = *((UINT32 *)ip_netmask);
/* Ethernet (MAC) address */
localmachine.localHW[0] = hard_addr[0];
localmachine.localHW[1] = hard_addr[1];
localmachine.localHW[2] = hard_addr[2];
localmachine.localHW[3] = hard_addr[3];
localmachine.localHW[4] = hard_addr[4];
localmachine.localHW[5] = hard_addr[5];
/* Init system services */
timer_pool_init();
/* Initialize all buffer descriptors */
mBufInit ();
/*interrupts can be enabled AFTER timer pool has been initialized */
/* Initialize all network layers */
EtherInit();
__asm CLI; /* Enable Interrupts */
#if USE_EXTBUS
ExternalBusCfg();
#endif
arp_init();
(void)udp_init();
(void)tcp_init();
/* Initialize applications */
(void)https_init ();
// THIS FUNCTION IS NOT NEEDED FOR EXAMPLE 2 smtpc_init ();
(void)udp_demo_init();
//REMOVE FOR EXAMPLE 2 // RTI_Enable ();
//RTI1_Init();
/* Add user application init code here */
MyAppInit();
LCDInit();
for (;
/* do forever */
{
#if USE_SWLED
UseSWLedRun();
#endif
if (gotlink) {
LCDPuts_Line1(" Ethernet Was Connected ");
sprintf(Buff,"IP = %X",hard_addr);
LCDPuts_Line2(Buff);
} // if (gotlink)
else
{
/* Link is DOWN - Add user application code here */
MyAppNotLinked();
LCDPuts_Line1("Ethernet Was Not Connect");
//LCDPuts_Line2("CAT 5 Cable Not Connect!");
} /* if (gotlink) */
} /* Forever loop */
for(;
{}
}
May I know how this function are connected in the demo program:- "INT32 udp_demo_eventlistener()" link to and link from? This function can be found in udpinterface.c. And also can you also tell me this function "void porth_isr_handler(void)" link to and link from?
However, do you have any method for testing the connection of TCP/IP where we can capture the data sedning from the MCU and also we can send the data to from PC to MCU. In this way we can control the MCU through sending the command data from PC through Internet to MCU like those application in RS-232?
How actually to getting more understand how's the data flow and also the connection of the TCP/IP? This may help when writting the firmware in MCU.
Regards
kahjoo