Wifi with SD Card...

Post any hardware related questions about your WiShield 1.0 here.

Re: Wifi with SD Card...

Postby bdodds » Fri Oct 29, 2010 12:52 pm

Oooo interesting! Google is great! :)

I wonder why there is code to setup what looks like Analog pins 0,1,2,3 as led pins with some other code doing something with them, but there is no electrical connection on the WiShield to these pins... ???
Code: Select all

#define LED0_BIT                  BIT0
#define LED0_DDR                  DDRC
#define LED0_PORT                  PORTC

#define LED1_BIT                  BIT1
#define LED1_DDR                  DDRC
#define LED1_PORT                  PORTC

#define LED2_BIT                  BIT2
#define LED2_DDR                  DDRC
#define LED2_PORT                  PORTC

#define LED3_BIT                  BIT3
#define LED3_DDR                  DDRC
#define LED3_PORT                  PORTC

#define LED_Init()    (DDRC |= LED0_BIT | LED1_BIT | LED2_BIT | LED3_BIT)

#define LEDConn_on()   (LEDConn_PORT |= LEDConn_BIT)
#define LED0_on()      (LED0_PORT |= LED0_BIT)
#define LED1_on()      (LED0_PORT |= LED1_BIT)
#define LED2_on()      (LED0_PORT |= LED2_BIT)
#define LED3_on()      (LED0_PORT |= LED3_BIT)

#define LEDConn_off()   (LEDConn_PORT &= ~LEDConn_BIT)
#define LED0_off()      (LED0_PORT &= ~LED0_BIT)
#define LED1_off()      (LED0_PORT &= ~LED1_BIT)
#define LED2_off()      (LED0_PORT &= ~LED2_BIT)
#define LED3_off()      (LED0_PORT &= ~LED3_BIT)

#define LED0_toggle()   ((LED0_PORT & LED0_BIT)?(LED0_PORT &= ~LED0_BIT):(LED0_PORT |= LED0_BIT))
#define LED1_toggle()   ((LED0_PORT & LED1_BIT)?(LED0_PORT &= ~LED1_BIT):(LED0_PORT |= LED1_BIT))
#define LED3_toggle()   ((LED0_PORT & LED3_BIT)?(LED0_PORT &= ~LED3_BIT):(LED0_PORT |= LED3_BIT))

bdodds
 
Posts: 20
Joined: Tue Oct 19, 2010 6:01 pm
Location: Orange County CA

Re: Wifi with SD Card...

Postby ArdWifi » Fri Oct 29, 2010 12:57 pm

I believe that is so that you can set up the RX TX LED's on any pin... would need to add them differently the mega as i guess they would be different

I haven't used them so weren't interested in playing with them...
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

Postby bdodds » Fri Oct 29, 2010 5:45 pm

I tested the SD Shield first alone on the MEGA with Pins 10-13 bent out of the way and wired to pins 11-13 to MEGA pins 50-52. (my CS is on pin 6)
It worked with both the Fat16 and SDfat library examples.

I next tested the WiShield stacked on top of the SD Shield with Pins 10-13 wired to MEGA pins 50-53.
It worked with the WiShield server examples.

next I tested with the server sketch have been playing with here (spi.h file had bad characters in it I guess)
But it fails to grab files off the SD card... Serial monitor in verbose mode is displaying my requests, but it can't find any files...

Retesting the SD Shield with the WiShield Stacked on top also fails... Hmmmmmm
Seams like it should be working since all the pins were shared before and now the 4 SPI pins are moved to the MEGA.

UPDATE: Retesting the SD Shield after pulling CS from pin 10 on the WiShield allows the SD tests to work again...
Why would the WiShield's CS on pin 10 interfere with the SD shield now but not before?

UPDATE2: I bent pin 10 of the WiShield out of the way and still no go on SD Shield unless I pull the CS jumper from WiShield pin 10 to 53 on the MEGA. How can a pin that is no longer hooked up to the SD Shield from the top or bottom cause it to fail??? Frustration ensues.......
bdodds
 
Posts: 20
Joined: Tue Oct 19, 2010 6:01 pm
Location: Orange County CA

Re: Wifi with SD Card...

Postby ArdWifi » Sat Oct 30, 2010 3:04 am

Are you pulling pin 53 high? Before initialising the sd card or the wishield and setting it to output?

It has to be set to output and brought high before initialising to put the arduino in spi master mode!
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

Postby bdodds » Sat Oct 30, 2010 9:24 am

Hmmm I forgot about changing that since all of the Example sketches for both shields just work with no modifications (other than the library tweaks)...

I remember where that is in the server sketch and will change it now. :)

I still find it odd that the SD Shield fails if pins 10 & 53 are hooked to the WiShield and there is no electrical connection to the SD Shield on pin 10....

UPDATE: I changed it and it works now, but like you I'm getting the same results on the MEGA as I did when running it on the UNO... :( (maybe even running slower???)
bdodds
 
Posts: 20
Joined: Tue Oct 19, 2010 6:01 pm
Location: Orange County CA

Re: Wifi with SD Card...

Postby bdodds » Sat Oct 30, 2010 10:25 am

The big question here now is:

Is this bottle neck the Hardware or Software limits?
bdodds
 
Posts: 20
Joined: Tue Oct 19, 2010 6:01 pm
Location: Orange County CA

Re: Wifi with SD Card...

Postby bdodds » Mon Nov 15, 2010 11:34 pm

I have made no progress on getting larger files to access of the SD card over WiFi.

THERE MUST BE A WAY!!! How could 600k be too much to ask?
bdodds
 
Posts: 20
Joined: Tue Oct 19, 2010 6:01 pm
Location: Orange County CA

Previous

Return to WiShield 1.0

Who is online

Users browsing this forum: No registered users and 1 guest