Blinky blinky!

Thanks to the nice tutorials that come with the development environment , i was blinking LEDs in no time! But as this thing is not one of those beginner arduino kits or such the tutorial quickly jumps in to teaching you how to write multithreded programs that run on multiple cores. The stuff can be a bit confusing at first since you are basically learning a new language called XC.  But its pretty much the same as C,  just with a few twists in it to allow multitasking and all these unique xmos features.

100_2636It went great until i got to the Ethernet part. I just couldn’t get stuff to compile but it thourned out to be a little compatibility issue and a wrong make file problem. But once i got it sorted the thing worked beautifully. I did a lot of reading also on how to program in XC so its a little more clear now and also digged in to the guts of the IP stack o understand exactly how it works.The job im working on now is getting a nicely working TCP/IP base. I plan on simply riping the webserver example apart til i get down to the TCP/IP port level. Since from that level up i can implement almost any service (from a webserver to FTP to sending e-mails) As far as i got trough the webserver code i see that it should not be very problematic as a open source TCP/IP stack was used. The stack is quite well documented so tomorrow im expecting to have a finished TCP/IP base and start fooling around with it.

Also found a nice Ethernet debugging tool while researching how the IP stack works. Its called WireShark and its a program that can display the raw data going trough the network card while analising it. I love this software as it bypasses everything and grabs the raw data right off the ethernet card. Only problem is that my network card is usually quite busy (IM,Mail,WebRadio…) so WireShark displays a whole pile of various traffic going all over the place. Im thinking of garbing a network card thats laying around and stick it in to PCI , then instead of plunging the xmos board in the router i could plug it in to the PC directly. That way i wouldn’t see any other junk on the line and i could see stuff that is going to other IPs as well.

Advertisements
Explore posts in the same categories: General

6 Comments on “Blinky blinky!”

  1. Jason Says:

    Stick in there! I am sure after a bit of a read and a few more examples etc things will become clear again! Great blog by the way 🙂

  2. Steve Watkins Says:

    Wire shark really? …wow it used to be called ethereal, and we had to build winpcap around winsock.

    BTW,becareful with out of band signaling, as most BSD sockets don’t take kindly to it.

    • Bernard Klinc Says:

      Well i didn’t use wireshark much yet.Progress is a bit slow on it, just yesterday i got a telnet server working on this board.

      • Steve Watkins Says:

        What do you make of IO tiles on the cpu? This seems very much like array logic to me. I need to digest these new possibilites before starting a code frame work.

        • Bernard Klinc Says:

          Well IO is no longer a SFR register like on most MCUs.Its a communication port. You can use it just as a general I/O (leds,buttons…) or you can set the port to be clocked by a pin, then the I/O changes according to that clock and gets buffered too.You then build your SPI,USART,I2C… by using this clocked mode.Clock can be external or generated by the chip automatically up to 100Mhz(so when used on a 32bit parallel port you get max 3200Mbit/s)

          So it is not some FPGA like device handling i/o its just that the i/o ports have these special clocking and buffering functions for building almost any interface you want.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: