EmbDev.net

Forum: µC & Digital Electronics LPC1768 Set GPIO using EMAC


von Prakash R. (Company: Coinel Technology Solutions) (prakash)


Rate this post
useful
not useful
Hello,

I am very new to EMAC. I have chosen the controller LPC1768 which have 
inbuilt Ethernet MAC.

I am trying to write firmware to operate some leds connected to LPC1768 
Board using EMAC protocol.i.e Ethernet cable is connected between 
LPC1768 Board and Laptop, make led on/off by laptop through EMAC.

It would be great if somebody give thoughts on it.

von fdffgtweds (Guest)


Rate this post
useful
not useful
u need a PHY chip
and a IP Stack

informations can be found here:
http://www.code-red-tech.com/lpc1768-development-kit.php

von Prakash R. (Company: Coinel Technology Solutions) (prakash)


Rate this post
useful
not useful
Thanks for your fast reply:)

The board which I am using have PHY IC on this board

http://coineltech.com/shop/product_info.php/cPath/5_8/products_id/44

von fdffgtweds (Guest)


Rate this post
useful
not useful
ok, u have a DP83848 PHY chip

then u need a software IP stack to communicate over TCP/IP or UDP

u can write one .....
or u can use an free libary


http://www.cm3tools.com/CodeRedWiki/RDB1768cmsisExampleProjects?action=AttachFile&do=get&target=RDB1768cmsis2.zip

or

http://coineltech.com/images/downloads/lpc1768_hplus_source_code.rar


both are using µIP
then u can send a UDP paket to switch LED ... or anything you need

von Prakash R. (Company: Coinel Technology Solutions) (prakash)


Rate this post
useful
not useful
Thanks,

I am using same µIP code. It working fine. But I am not able to create 
some button on that http page. For example button LED1_SET/ LED1_CLR and 
LED2_SET/ LED2_CLR.

Depending upon clicking that buttons, need operate LEDs.

von fdffgtweds (Guest)


Rate this post
useful
not useful
u have to build a new html page with buttons
and read the html code
look in that html code for buttons,... there are "events"
checkboxes have also "events"   check / uncheck

your SW check the html code for those "events" and do something or even 
not ..

von Prakash R. (Company: Coinel Technology Solutions) (prakash)


Rate this post
useful
not useful
ok

I am very new to html(create), I will try to create html with buttons 
and will check.

thanks for your support

von usha B. (Company: coinel technology solutions) (usha)


Rate this post
useful
not useful
Please send a sample code for creating html page.

von usha B. (Company: coinel technology solutions) (usha)


Rate this post
useful
not useful
Now i have created an html page with buttons , Now i need to perform 
some operations to blink the test led on my target board when i click on 
the button created on my html page.At this point ,Im not getting how to 
read the c code for led blink  written using keil ide when i click on 
the button created on the web page.

please do help!!!

von sadegh (Guest)


Rate this post
useful
not useful
Hello there,

i got a question about the easyweb example for the lpc1768.

Here's how to calculate the address allocated?

thank you.

#define NUM_RX_FRAG 4 /* Num.of RX Fragments 4*1536= 6.0kB */
#define NUM_TX_FRAG 3 /* Num.of TX Fragments 3*1536= 4.6kB */
#define ETH_FRAG_SIZE 1536 /* Packet Fragment size 1536 Bytes */

#define ETH_MAX_FLEN 1536 /* Max. Ethernet Frame Size */

/* EMAC variables located in 16K Ethernet SRAM _ bank 1 */
#define RX_DESC_BASE 0x20080000
#define RX_STAT_BASE (RX_DESC_BASE + NUM_RX_FRAG*8) // 4*(2*4)
#define TX_DESC_BASE (RX_STAT_BASE + NUM_RX_FRAG*8) // 4*(2*4)
#define TX_STAT_BASE (TX_DESC_BASE + NUM_TX_FRAG*8) // (4-1)*(2*4)
#define RX_BUF_BASE (TX_STAT_BASE + NUM_TX_FRAG*4) // (4-1)*(1*4)
#define TX_BUF_BASE (RX_BUF_BASE + NUM_RX_FRAG*ETH_FRAG_SIZE)

/* RX and TX descriptor and status definitions. */
#define RX_DESC_PACKET(i) (*(unsigned int *)(RX_DESC_BASE + 8*i))
#define RX_DESC_CTRL(i) (*(unsigned int *)(RX_DESC_BASE+4 + 8*i))
#define RX_STAT_INFO(i) (*(unsigned int *)(RX_STAT_BASE + 8*i))
#define RX_STAT_HASHCRC(i) (*(unsigned int *)(RX_STAT_BASE+4 + 8*i))
#define TX_DESC_PACKET(i) (*(unsigned int *)(TX_DESC_BASE + 8*i))
#define TX_DESC_CTRL(i) (*(unsigned int *)(TX_DESC_BASE+4 + 8*i))
#define TX_STAT_INFO(i) (*(unsigned int *)(TX_STAT_BASE + 4*i))
#define RX_BUF(i) (RX_BUF_BASE + ETH_FRAG_SIZE*i)
#define TX_BUF(i) (TX_BUF_BASE + ETH_FRAG_SIZE*i)

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.