Thursday, April 21, 2011

PSoC3 + ENC28J60 : It blinks!

So,having finally worked out SPI communication(at 10Mbits/sec! ),I set about writing the driver for the chip.
So far,Ive been able to make the Status LEDs blink :)

The code,so far.(Its really rough,no safety nets or any slick optimization tricks.)


I'll end this post with a picture of the working setup :


TODO:
    • Compare and Improve the existing Driver code with respect to the EtherShield 1.6 one. 
                Update - 06-05-11 : Done.Awaits testing once the kit is back up.
    • Add UART & LCD to the FTK,using this & this,for debugging purposes.
    • Use the basic Ping/UDP code from Tuxgraphics' "An AVR microcontroller based Ethernet device",and get that to work.
    • Add on higher stuff like Webserver,NTP,DNS etc,using the EtherShield 1.6 code

    5 comments:

    1. the upload of your test code ("SPI.rar") expired,
      could you make it avaiable again?
      i found your blog while looking for some simple example code for the ENC28J60.

      ReplyDelete
    2. Ah,sure.Ive fixed the link.But what you should be looking at is

      http://www.tuxgraphics.org/electronics/

      Drop me an email for more.

      ReplyDelete
    3. thanks!
      i am aware of existing ENC28J60 drivers... but i was hoping for a simple few lines of code i could use for testing basic functionality...
      but it appears that's not actually what you wrote... you got an existing driver to run to the point where it could access the LEDs...?
      i was hoping to avoid both the complexity of a full-blown driver and the tedious and error-prone low level handiwork of writing code according to the datasheet... :\

      ReplyDelete
    4. I was wondering if you can write a tutorial/step by step instructions on how to do this. I am working on the same project but I am lost on how to connect the ethernet to the PSOC

      ReplyDelete
    5. Hey Tom,
      Sure can do.I'll write one out this weekend,as I'm currently busy with exams.

      ReplyDelete