EmbDev.net

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


Author: Prakash Rajolli (Company: Coinel Technology Solutions) (prakash)
Posted on:

Rate this post
0 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.

Author: fdffgtweds (Guest)
Posted on:

Rate this post
0 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

Author: Prakash Rajolli (Company: Coinel Technology Solutions) (prakash)
Posted on:

Rate this post
0 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/...

Author: fdffgtweds (Guest)
Posted on:

Rate this post
0 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/RDB1768cmsisEx...

or

http://coineltech.com/images/downloads/lpc1768_hpl...


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

Author: Prakash Rajolli (Company: Coinel Technology Solutions) (prakash)
Posted on:

Rate this post
0 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.

Author: fdffgtweds (Guest)
Posted on:

Rate this post
0 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 ..

Author: Prakash Rajolli (Company: Coinel Technology Solutions) (prakash)
Posted on:

Rate this post
0 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

Author: usha Beluregowda (Company: coinel technology solutions) (usha)
Posted on:

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

Author: usha Beluregowda (Company: coinel technology solutions) (usha)
Posted on:

Rate this post
0 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!!!

Author: sadegh (Guest)
Posted on:

Rate this post
0 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)

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.