User Tools

Site Tools


demos:webserver

This is an example that makes the Quick240 behave as a web-server. Take special note of !!MODIFY THIS!! if you don't change it to reflect your network you will be unable to connect to it.

To connect go to your favorite browser and enter the ip-address from the sketch in the address bar.

You will need the sketch quick_webserver.zip. You will also need the libraries from http://www.digilentinc.com/Agreement.cfm?DocID=DSD-0000318 after you agree to the terms. If you get an error when compiling that looks something like this:

/Users/username/Documents/mpide/libraries/chipKITEthernet/utility/chipKITEthernetAPI.c: In function 'InitializeBoard': /Users/username/Documents/mpide/libraries/chipKITEthernet/utility/chipKITEthernetAPI.c:121:3: error: #error Board/CPU combination not defined

Then you will need to modify the chipKITEthernetAPI.c file InitializeBoard() to look like this:

chipKITEthernetAPI.c
static void InitializeBoard(void)
{	
#if defined(_BOARD_MEGA_) || defined(_BOARD_CEREBOT_32MX7_)    
	TRISEbits.TRISE9 = 0;   // output phy enable SMSC8720, data part of the NIC
	LATEbits.LATE9 = 1; 	// high, enable the phy
#elif defined(_BOARD_CEREBOT_MX7CK_)
	TRISAbits.TRISA6 = 0;   // output phy enable SMSC8720, data part of the NIC
	LATAbits.LATA6 = 1; 	// high, enable the phy
#else
	TRISEbits.TRISE9 = 0;   // output phy enable SMSC8720, data part of the NIC
	LATEbits.LATE9 = 1; 	// high, enable the phy
	//#error	Board/CPU combination not defined
#endif
        TRISEbits.TRISE9 = 0;   // output phy enable SMSC8720, data part of the NIC
        LATEbits.LATE9 = 1; 	// high, enable the phy
 
}

Also place the these webserver_files.zip files on the root of your micro-SD card.

demos/webserver.txt · Last modified: 2014/09/26 22:15 by jacob