Rennie Johnson
Active member
I'm trying to use a Teensy 4.1 in a board I designed for v3.5 as the 3.5 units are no longer available. I've modified the board for the 3.3v input compatibility, but I can't get the original SPI ethernet interface to connect to my WIZNET WIZ811MJ ethernet device. All other code, including the LCD library are working. The SPI pin numbers on v4.1 appear to be the same as v3.5. I use pin #9 to reset the Wiznet.
Is is possible that the Arduino compiler doesn't load the compatible ethernet library when compiling for a 4.1 device?
I've listed the relevant code snippets. The SPI pin numbers are shown. Is there additional code required to use the older ethernet library on a 4.1?
I use the following compiler versions (because I can't upload sketches properly on my workstation with current versions)
Ardino 1.8.13
Teensyduino 1.53
I appreciate your thoughts.
Is is possible that the Arduino compiler doesn't load the compatible ethernet library when compiling for a 4.1 device?
I've listed the relevant code snippets. The SPI pin numbers are shown. Is there additional code required to use the older ethernet library on a 4.1?
I use the following compiler versions (because I can't upload sketches properly on my workstation with current versions)
Ardino 1.8.13
Teensyduino 1.53
Code:
//ETHERNET PINS
#define PIN_ETHERNET_RESET 9
#define PIN_ETHERNET_SCS 10
#define PIN_ETHERNET_MOSI 11
#define PIN_ETHERNET_MISO 12
#define PIN_ETHERNET_SCLK 13
//Include Standard Ethernet Library
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(198, 0, 0, 4);
// Initialize Ethernet Reset Pin To High
pinMode(PIN_ETHERNET_RESET, OUTPUT);
digitalWrite(PIN_ETHERNET_RESET, HIGH);
// Reset The Wiznet 811MJ
digitalWrite(PIN_ETHERNET_RESET, LOW);
digitalWrite(PIN_ETHERNET_RESET, HIGH);
m_server = new EthernetServer(12345);
//Initialize Ethernet Library
Ethernet.begin(mac_address, ip);
//Start Ethernet Server
m_server->begin();
I appreciate your thoughts.