ARduino EThernet Board + LCD + SPI +Serial Conflict
jainvikas8 2012-08-30 06:15:41 17382 Views10 Replies Hello! All,
--This TOPIC for DFROBOT--- as i am using their product
Project uses https://arduino.cc/en/Main/ArduinoBoardEthernet board enabled with Ethernet and SD card.
RFID Reader -- https://www.arduino.cc/playground/Code/ID12 which uses "SoftwareSerial.h" to talk to the unit ---- SoftwareSerial mySerial = SoftwareSerial(14,15); // rx tx van rfid sensor
Added wifi module - https://www.sparkfun.com/products/10822 and XBEE shield https://www.sparkfun.com/products/8471 for which i am using "WiflySerial.h" ---- WiFlySerial WiFly(16,17);
Also Using Ethernet now to connect to the web server perform an activity
Have connected 3-Wire SErial LCD - https://wiki.dfrobot.com/dfr0091/ (Using 3-wire mode) ...
Individually WiFi,Ethernet, LCD and RFID Reader works fine, they have been tested with examples and with my own modified code.
----Problem------
The Wifi module doesn't work and the board restarts the setup() procedure. This is because due to addition of LCD code to the project.
The execution is quite simple. Serial.beign() (for COM)-->Initialize LCD --> Initialize Ethernet --> Initialize Wifi --> Initialize RFID ---> Enter Loop()--------
The FREE MEMORY is around 200 bytes approx (when all code is active)
All the pins configs are checked...
The code starts executing till Ethernet and When it starts the initialization procedure for WIFI it restarts from the beginning............?
Now if LCD Module Or Wifi is removed it works fine .!!
Have reached a deadlock state to sort out this issue...
Please if you have any thoughts let me know... Thanks.
I can paste the CODE when i receive some replies. Thanks.
I've never used this library so I don't know how effective it might be. But it might be worth a shot for you.
Debug library.
Thanks for the heads up on the Opera issues. I will tell our web dev to take a look into this issue.
Hector Yes, I did the debugging print... and it stops executing just before Ethernet.begin()... I can't do debugging of Ethernet.begin() can I?
One more thing: This site doesnot have compatibility for Opera 12+ (It use to be fine yesterday, today the formating of the page is all messed up)
jainvikas8 So now we know the conflict is definitely being caused by something within the code. You need to do some debugging. You might want to try putting print statements in your code to pinpoint where you are hitting a problem...
Hector I did run the code without the LCD module attached and it has the same result?
jainvikas8 There is no scheduled down time for our site. We do sometimes take the site down for quick updates, but never for more than 5 minutes.
I will ask our IT admin if there was any known downtime in the periods you mention.
Hector Thanks for the reply.
I have not tested it that way... Will do it..
But Will it make an difference? What if it does work or not?
Message to the Moderator:
Is there an SITE Maintenance Period for DFrobot.com? I am using Opera 12 and I.E 9 and tried to reply to this post on 0730 and 0830 (GMT + 1), but really nothing happens? (It has happened to me yesterday too)
Regards
jainvikas8
jainvikas8 When you physically remove the LCD but leave the code in place does the error still happen?
Hector Code is attached.
Power is connected.
Its not restarting anymore..
but a different problem...
It does not execute after Ethernet Initialization... stops as Ethernet.begin()
The LCD is connected via I2C (a dfifferent one), also with the Serial LCD you have it never works past the EThernet.begin()
jainvikas8 Please post your code...
How are you connecting your wifly to the Arduino? Because you state that you define a software serial, but you provided a link to a xbee shield, which is hardwired to Serial 0 (digital pins 0,1).
We sell a similar shield. You can see from the link that the shield makes use of pins 0,1.
another problem you might be having is power. How are you providing power? The USB cable will most likely not be enough to power all the modules. Please try supplying at least 7V @ 1A external power.
If the board is re-starting it most likely is a power problem.
Hector --This TOPIC for DFROBOT--- as i am using their product
Project uses http://arduino.cc/en/Main/ArduinoBoardEthernet board enabled with Ethernet and SD card.
RFID Reader -- http://www.arduino.cc/playground/Code/ID12 which uses "SoftwareSerial.h" to talk to the unit ---- SoftwareSerial mySerial = SoftwareSerial(14,15); // rx tx van rfid sensor
Added wifi module - https://www.sparkfun.com/products/10822 and XBEE shield https://www.sparkfun.com/products/8471 for which i am using "WiflySerial.h" ---- WiFlySerial WiFly(16,17);
Also Using Ethernet now to connect to the web server perform an activity
Have connected 3-Wire SErial LCD - https://www.dfrobot.com/wiki/index.php?t ... DFR0091%29 (Using 3-wire mode) ...
Individually WiFi,Ethernet, LCD and RFID Reader works fine, they have been tested with examples and with my own modified code.
----Problem------
The Wifi module doesn't work and the board restarts the setup() procedure. This is because due to addition of LCD code to the project.
The execution is quite simple. Serial.beign() (for COM)-->Initialize LCD --> Initialize Ethernet --> Initialize Wifi --> Initialize RFID ---> Enter Loop()--------
The FREE MEMORY is around 200 bytes approx (when all code is active)
All the pins configs are checked...
The code starts executing till Ethernet and When it starts the initialization procedure for WIFI it restarts from the beginning............?
Now if LCD Module Or Wifi is removed it works fine .!!
Have reached a deadlock state to sort out this issue...
Please if you have any thoughts let me know... Thanks.
I can paste the CODE when i receive some replies. Thanks.
jainvikas8 
