#include <SPI.h>
#include <Ethernet.h>
#define ethRSTpin 9
#define ethCSpin 10
byte mac[] = { 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 };
IPAddress ip(10, 0, 2, 55);
IPAddress subnet(255, 255, 255, 0);
IPAddress gateway(10, 0, 2, 1);
IPAddress dnsServer(10, 0, 2, 1);
EthernetClient client;
void setup() {pinMode(ethRSTpin, OUTPUT);[INDENT]digitalWrite(ethRSTpin, LOW);
[/INDENT]
[INDENT]delay(1000);
[/INDENT]
[INDENT]digitalWrite(ethRSTpin, HIGH);
Ethernet.init(ethCSpin);
Ethernet.begin(mac, ip, dnsServer, gateway, subnet);
[/INDENT]
}
Is it right to wire Teensy 3.6 directly to WIZ850io in the following way?
Teensy PIN ------------> WIZ850io
9 (SPI0 - RESET) -----> RSTn
10 (SPI0 - CS0) -------> SCNn
11 (SPI0 - MOSI0) ----> MOSI
12 (SPI0 - MISO0) ----> MISO
13 (SPI0 - SCK0) -----> SCLK
GND -------------------> GND
External 3.3V ---------> 3.3V
#include <SPI.h>
#include <Ethernet.h>
#define ethRSTpin 9
#define ethCSpin 10
byte mac[] = { 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 };
IPAddress ip(10, 0, 2, 55);
IPAddress subnet(255, 255, 255, 0);
IPAddress gateway(10, 0, 2, 1);
IPAddress dnsServer(10, 0, 2, 1);
EthernetClient client;
void setup() {
pinMode(ethRSTpin, OUTPUT);
digitalWrite(ethRSTpin, LOW);
delay(1000);
digitalWrite(ethRSTpin, HIGH);
Ethernet.init(ethCSpin);
Ethernet.begin(mac, ip, dnsServer, gateway, subnet);
}
// Hold reset pin LOW for 1ms to initiate reset
pinMode(ethRSTpin, OUTPUT);
digitalWrite(ethRSTpin, LOW);
delay(1);
digitalWrite(ethRSTpin, HIGH);
// Wait another 50ms for board to become available
delay(50);
http://wizwiki.net/wiki/doku.php?id=products:wiz850io:start
User need to wait for 50ms after this pin is changed to HIGH to communicate with WIZ850io. (Refer to 5. Timing Diagram)
It sounds after you change the PIN back to high, you do need to wait 50ms like my example above?
Top View - Teensy 3.6 with adapter PCB and WIZ850ioCould you post a pic of the wiz850io and teensy 3.6 together?