cjr

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cjr

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  1. Looks like i've found the culprit. The standard Ethernet Library (from the Arduino IDE, library version 1.0.5, because there is no Ethernet Library with DesignLab) implements some shortcuts for the SPI "Slave Select" pin. The inlines for the SS pin are defined as inline static void initSS() { DDRB |= _BV(6); }; inline static void setSS() { PORTB &= ~_BV(6); }; inline static void resetSS() { PORTB |= _BV(6); }; if the __AVR_ATmega32U4__ symbol is defined, like it is on the Papilio Duo. Pin B6 is pin 14 on the PCB, so no wonder it's not working. I changed the 3 inlines to _BV(0) (aka pin 10 on the PCB), now it's working. Is there a predefined symbol like "IM_A_PAPILIO_DUO" or something like that in DesignLab? Then i could use some #ifdefs in the Ethernet Library and recommend this also to the author of the library. Best Regards, Christof.
  2. Although i have my own circuit in the FPGA, i'm sure that i'm not using pins 10-13. Because my FPGA circuit is also active when i'm using the sketch with the EtherCard with the same physical pins, where it is working OK. Nevertheless, i will try it with the blank circuit in the FPGA and tell You the result. Ok, i think my original post was not clear enough: The ENC28J60 is attached to the physical pins 10-13, but i had to tell the UIPEthernet Library to use Pins 50-53. This crazy configuration is WORKING! That's why i'm confused. I don't understand why the UIPEthernet Library will not work with pins 10-13. SW1 is connected correctly in my circuit, Reset is working fine. I already studied all the resources, pinouts, diagrams and so on, i even traced some signals on the PCB :-)
  3. Hello everybody, first i would like to say that my problem has nothing to do with the FPGA part, i'm not using any soft processor in the FPGA. I would like to connect an Arduino Ethernet Shield (with the W5100 chip) to the AVR part of my DUO. I already have an ENC28J60 card running with the UIPEthernet library, this card is also connected via SPI. BUT: For the ENC28J60 i needed to set the SPI pins to #define UIP_FORCE_SS 53 #define UIP_FORCE_SCK 52 #define UIP_FORCE_MOSI 51 #define UIP_FORCE_MISO 50 (these UIP_FORCE constants were invented by myself). This is working! But i don't understand it , because the AVR does not have these high output pin numbers ?!? The standard ethernet library for the Arduino Ethernet Shield obviously uses some other pins, but i'm unable to extract the pins from the library source code, this is all very confusing. What is NOT working: SCK 13 MISO 12 MOSI 11 SS 10 or 8 I know that i have to connect these Arduino Pins from the DUO to the ICP header at the Ethernet Shield. Well, this is all very mysterious. Maybe someone could tell me simply which Pins on the DUO are the official SPI connections? I will also try some other SPI device in the meantime. Best Regards, Christof