Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / SOLVED! Re: WIZ810MJ module with Ethernet library on: September 16, 2013, 04:43:37 pm
It works!  Looks like that 10K resistor on the SPI_EN line was the culprit, so the SPI bus on the WIZ810MJ wasn't being enabled properly.  I should have gone straight to the 3.3v supply.

To recap here are my connections:

JP 2:24 (3.3v Vcc) -> my own 3.3v regulator on breadboard
JP 2:14 (GND) -> GND
JP 1:7 (SCLK) -> "Arduino digital pin 13"
JP 1:10 (SCS) -> "Arduino digital pin 10"
JP 1:9 (MOSI) -> "Arduino digital pin 11"
JP 1:12 (MISO) -> "Arduino digital pin 12"
JP 2:2 (/RESET) -> "Arduino digital pin 9" - doing a hardware reset from within setup()
JP 2:9 (SPI_EN) -> 3.3v

and the working test code:
Code:
#include <SPI.h>
#include <Ethernet.h>

// this must be unique
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEC };

IPAddress ip( 192,168,3,77 );
// don't know if this is your gateway, but this is normal
IPAddress gateway( 192,168,3,1 );
IPAddress subnet( 255,255,255,0 );

void setup()
{
  pinMode(9,OUTPUT);
  digitalWrite(9,LOW);  // reset WIZ810MJ module
  delay(100);
  digitalWrite(9,HIGH);
  delay(100);


  Serial.begin(9600);

  Serial.print(F("Starting w5100..."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  Serial.println(Ethernet.localIP());

  Serial.println(F("Ready"));
}

void loop() {
}

The module now responds to pings at the designated IP address.  I may play around and see if I can get away without using that software reset trick on digpin9, but for now I'm happy.

Thank you so much for your help!
2  Using Arduino / Networking, Protocols, and Devices / Re: WIZ810MJ module with Ethernet library on: September 16, 2013, 04:30:07 pm
I tried disconnecting my programmer (since I'm using the ICSP method) and now I get this:

Starting w5100...0.0.0.0
Ready


So still not communicating properly, but at least the programmer isn't interfering anymore.  I've double-checked my connections to the WIZ810MJ module -- all seems to be in order.
3  Using Arduino / Networking, Protocols, and Devices / Re: WIZ810MJ module with Ethernet library on: September 16, 2013, 04:21:35 pm
I saw the restart idea in another post, and my module seemed to sometimes come up in a confused state on power-up, so resetting it this way has at least made it consistently link to my router.

I was able to get a serial monitor working!  It reported:

Starting w5100...255.255.255.255
Ready



So it looks like the IP address is not being set correctly?  Is this an issue with the Arduino not communicating with the WIZ810MJ?

Thanks for your help!
4  Using Arduino / Networking, Protocols, and Devices / Re: WIZ810MJ module with Ethernet library on: September 16, 2013, 12:56:58 pm
Hi SurferTim!  I made two slight modifications to your code.  I changed the IP address as .139 is my programming laptop.  I also added the code for resetting the WIZ810MJ module via digpin9.

Code:
#include <SPI.h>
#include <Ethernet.h>

// this must be unique
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEC };

IPAddress ip( 192,168,3,77 );
// don't know if this is your gateway, but this is normal
IPAddress gateway( 192,168,3,1 );
IPAddress subnet( 255,255,255,0 );

void setup()
{
  pinMode(9,OUTPUT);
  digitalWrite(9,LOW);  // reset WIZ810MJ module
  delay(100);
  digitalWrite(9,HIGH);


  Serial.begin(9600);

  Serial.print(F("Starting w5100..."));
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  Serial.println(Ethernet.localIP());

  Serial.println(F("Ready"));
}

void loop() {
}

The WIZ810MJ lights up (both green and yellow LEDs solid, yellow flickers with network activity), but no ping response.  I wasn't sure if just the module and library were smart enough to respond to pings.

Unfortunately, I don't have a serial monitor without a true Arduino board.  Let me see if I can rig something up -- reading those debug messages would probably be very helpful.
5  Using Arduino / Networking, Protocols, and Devices / WIZ810MJ module with Ethernet library on: September 16, 2013, 12:23:40 pm
I'm trying to connect the WizNet WIZ810MJ module directly to my ATMEGA328 chip (basically building a Duemilanove on a breadboard), but I can't seem to get any network traffic.  Here are my connections:

JP 2:24 (3.3v Vcc) -> my own 3.3v regulator on breadboard
JP 2:14 (GND) -> GND
JP 1:7 (SCLK) -> "Arduino digital pin 13"
JP 1:10 (SCS) -> "Arduino digital pin 10"
JP 1:9 (MOSI) -> "Arduino digital pin 11"
JP 1:12 (MISO) -> "Arduino digital pin 12"
JP 2:2 (/RESET) -> "Arduino digital pin 9" - doing a hardware reset from within setup()
JP 2:9 (SPI_EN) -> 3.3v via 10K pull-up

I am not trying to use the SPI bus for anything else, so that's why I just tied the SPI_EN pin to 3.3v.  Is this OK?

Arduino digital pin 9 is providing the WIZ810MJ with a 100ms LOW pulse on startup, before any of the Ethernet library functions are used.

I'm currently working with the WebServer example sketch.  All of the code appears to be running (I have confirmed that the ATMEGA chip is running the loop() code without any hang-ups).  The WIZ810MJ is showing that it has a link to my Ethernet router, and the yellow light blinks when I try to ping it, but I get no ping response and no webpage in a browser at its IP address.  The IP is being assigned statically, but it is within the proper range (Arduino at 192.168.3.77 and laptop at 192.168.3.139, subnet 255.255.255.0).

I am running Arduino 1.0.5 on Linux, uploading via parallel port programmer (all this seems to be working just fine).

Any ideas what I'm missing?  From what I've found on the forum so far, the WIZ810MJ module should work with the Ethernet library, but I'm running out of ideas.
6  Using Arduino / General Electronics / Re: supplier for flatted-shaft knob without pointer on: February 13, 2013, 10:50:57 am
I'll definitely have to keep the paint trick in mind for future projects, as well as the 6.35mm tip!  As it turns out, Mouser does have a few knobs that look like they'll work:

http://www.mouser.com/Search/ProductDetail.aspx?R=450-AA150
http://www.mouser.com/Search/ProductDetail.aspx?R=450-C153

For some reason I hadn't found the caps without pointers until now.  Will add some to my next order and try them out.


Thanks for the quick responses!  ...and now, back to creating more Arduino awesomeness.
7  Using Arduino / General Electronics / supplier for flatted-shaft knob without pointer on: February 12, 2013, 10:58:01 pm
Hello all!

I'm working on a project that uses several rotary encoders (just discovered pin-change interrupts on an ATMEGA328 -- awesome!), and I'm having a very hard time finding a source for knobs.  Does anybody have any suggestions where I can find knobs for a 6mm flatted "D" shaft with no pointer line or dot?  My usual go-to source is mouser.com, but either they don't carry much or I'm just not getting along with their search engine this time.  I'd prefer a US distributor, but I'd be willing to consider ordering internationally too.

Thanks!
8  Forum 2005-2010 (read only) / Interfacing / Re: DMX woes... on: June 14, 2010, 05:01:42 pm
I know I just posted this in another thread, but hopefully adding it here will help the next person who goes searching for this information.

The interrupt handler for the USART receive signal appears to have changed at some point for the ATMega328 chip.  Starting with gaggenau's code as shown earlier in this thread, change...

this:
SIGNAL(SIG_USART_RECV) {  // for ATMega168
...
}

to this:
SIGNAL(USART_RX_vect) {  // for ATMega328
...
}

Ironically both names seem to work fine for the ATMega168.  I realized something was wrong with the interrupt handler routine because the compiled sketch was staying the same size even when I commented out parts of the routine.

I'm running Arduino-0018.  Hope this helps.


Jeremy
9  Forum 2005-2010 (read only) / Interfacing / Re: ATMega168 vs 328 USART -- what's different? on: June 14, 2010, 05:25:57 pm
Good to know -- I have changed my code to use ISR(), and everything appears to be working great.  Thanks for the tip!


Jeremy
10  Forum 2005-2010 (read only) / Interfacing / Re: ATMega168 vs 328 USART -- what's different? on: June 14, 2010, 04:56:46 pm
OK, I think I found the problem.  The name of the interrupt handler needed to be changed from:

SIGNAL(SIG_USART_RECV) {  // for ATMega168
...
}

to:
SIGNAL(USART_RX_vect) {  // for ATMega328
...
}

Ironically both names seem to work fine for the ATMega168.  I realized something was wrong with the interrupt handler routine because the compiled sketch was staying the same size even when I commented out parts of the routine.

Good news is that I did learn a few things about the inner workings of the chip in the process -- little did I know that the full datasheet was 500+ pages long... yikes!  Looks like I've got some more reading to do.


Jeremy
11  Forum 2005-2010 (read only) / Interfacing / Re: ATMega168 vs 328 USART -- what's different? on: June 14, 2010, 12:57:47 pm
Yes, I got an upload error message if I didn't.

For the ATMega328, I used "Arduino Duemilanove or Nano w/ ATmega328".
For the ATMega168, I used "Arduino Diecimila, Duemilanove, or Nano w/ ATmega168".


Otherwise everything else is the same -- hardware board, parallel programming cable, sketch, etc.


Jeremy
12  Forum 2005-2010 (read only) / Interfacing / Re: ATMega168 vs 328 USART -- what's different? on: June 14, 2010, 12:01:05 pm
I'm using DMX code based on this thread (post #20):
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1223117506/15


Jeremy
13  Forum 2005-2010 (read only) / Interfacing / ATMega168 vs 328 USART -- what's different? on: June 14, 2010, 12:00:02 pm
I'm working on a DMX receiver circuit that I originally developed for the ATMega168 chip (I'm using bare chips and my own boards).  When I reordered more chips I got the ATMega328 instead, thinking that the only difference was more memory.  My problem is that the ATMega168 chip works and the ATMega328 chip doesn't, even though I'm uploading the same sketch and using the same board.

The ATMega168 will properly receive the DMX signal coming in on the RX pin (via an SN75176).  The ATMega328, however, freezes when it sees anything on the RX pin.  Is there something different about the USART on the 328?

I'll keep browsing through the forum here, but if anyone can help me figure out what's different between the 168 and 328 I'd love to hear from you.  I'm currently using Arduino-0018 on Xubuntu Linux.


Jeremy
Pages: [1]