XC-2 and Ethernet

Technical questions regarding the XTC tools and programming with XMOS.
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

XC-2 and Ethernet

Post by narutoxela »

I have an XC-2 Ethernet kit and i wanted to use it as an LED screen controller. More or less obviously I want to use Ethernet as a way to send data to the board... I was looking at the ethernet code that i got from the software components on Xmos.com and i find it... very confusing...

I would like to know if there is a "minimal" of simplified version of the code where i can just receive data, seperate the data part of the ethernet packet in to 32bit int's and store it in a frame buffer(external SRAM chip)...

if you have any questions, feel free to ask :D

Thanks in advance,
-Alex


User avatar
phalt
Respected Member
Posts: 298
Joined: Thu May 12, 2011 11:14 am

Post by phalt »

Have you looked at the sc_ethernet component on the XCore github?
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

phalt wrote:Have you looked at the sc_ethernet component on the XCore github?
Yes I did and its essentially the same... and still as confusing...
User avatar
matrix
Active Member
Posts: 62
Joined: Sat Sep 17, 2011 12:05 pm

Post by matrix »

Hi,

just for the case you did not check already:

https://www.xcore.com/forum/viewtopic.p ... 5&start=10

The link contains various user experiences and links with code examples,
UDP included.
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

narutoxela wrote:I would like to know if there is a "minimal" of simplified version of the code where i can just receive data, seperate the data part of the ethernet packet in to 32bit int's and store it in a frame buffer(external SRAM chip)...
There's a simple version of the ethernet code in Programming XC on XMOS Devices (see 6.5 Case Study: Ethernet MII). This omits error checking / CRC checking so you probably can't use in a real application without modification, but you may find it helpful if you are trying to understand the protocol.
User avatar
davelacey
Experienced Member
Posts: 104
Joined: Fri Dec 11, 2009 8:29 pm

Post by davelacey »

This is arguably hidden in the documentation a bit but it is worth going through the code walkthrough here:

http://github.xcore.com/sc_ethernet/app_tutorial.html

Dave
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

Thank you all, I will be looking at your links! :P Hope ill find what im looking for! :P
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

I was just thinking about it... Maybe Ethernet is just too complicated and maybe even overkill for my application. Basically i will be sending 28224 Byte frames at 60Hz, so it makes arround 2MBytes/s... Maybe i could just use a FT2232H and put it in USB to Parallel FIFO mode which is capable of 10MBytes/sec. It should be way simpler... I think... What do you think?...
User avatar
matrix
Active Member
Posts: 62
Joined: Sat Sep 17, 2011 12:05 pm

Post by matrix »

Which max. transfer distance does your application need ?
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

matrix wrote:Which max. transfer distance does your application need ?
Ohh... not alot, max 6 to 10 feet...

Edit: But the conversion from USB to FIFO would be only towards the end of the total distance so it would be 6 to 10 feet of USB Cable then the conversion would take place on the onboard F2232H (custom pcb).