teensy3.1 with wiznet 5500

Status
Not open for further replies.
hi

I work on teensy 3.1 + ethernet module USR-ES1 with wiznet 5500 (http://www.usr.so/Product/93.html).
i first try with arduino Uno board and was running well… then moved to teensy, and that was not running… so normally I can used same code !

after some look on internet try this issue :
- 3.3v external power
- Reset connection ::: but that part is not clear for me ( and with the uno the ethernet module run well without the reset connection).
Does it need to be HIGH and when ?

for the rest i have follow wire instruction, whose work well on Uno test… just not used the reset wiring…
10:CS --> SS
11:DOUT --> MOSI
12:DIN --> MISO
13:SCK --> SCLK
gnd --> gnd
3.3 --> 3.3
9 --> reset ???


My goal is to send osc message over udp using MAx/msp, just add a led on pin 3 for test...
here is the code i used :

HTML:
#include <SPI.h>        
#include <Ethernet.h>
#include <EthernetUdp.h>

#include <OSCMessage.h>
#include <OSCBoards.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(169, 254, 129, 204); // ip to send to arduino
unsigned int InPort = 8888;      // port to send on

EthernetUDP Udp; // An EthernetUDP instance to let us send and receive packets over UDP


//================================================================ SETUP =================================
void setup() {
  // start the Ethernet and UDP:
  Ethernet.begin(mac,ip);
  Udp.begin(InPort);

 Serial.begin (9600);
 pinMode(3, OUTPUT);
 pinMode(9, OUTPUT); // wire to reset on wiz module

 //digitalWrite(9, HIGH); // ???? high ???

 Serial.println("Setup");

}


// ============================================================== LOOP ====================================
void loop() {

OSCMessage messageIN;
   int size;
   
 
   if((size = Udp.parsePacket())>0){
       while(size--){
       messageIN.fill(Udp.read());
       Serial.println("aaa");
       }
       
       if(!messageIN.hasError()) {
       messageIN.route("/led", manageOSCMess_leds);  // message from MAx = /led [0/1]
       Serial.println("ccc");
       }
        
   }
}


void manageOSCMess_leds(OSCMessage &msg, int addrOffset ){
  Serial.println("Trigger signal received");
  
    if (msg.isInt(0)){                               
        int i = msg.getInt(0);                       
        digitalWrite(3, (i > 0)? HIGH: LOW);
  
      }
}

i used arduino 1.6.5 and teensyduino 1.25, without error compilation

if you have some ideas to fix it it's really welcome…
all the best
 
Status
Not open for further replies.
Back
Top