Wifi with SD Card...

Post any hardware related questions about your WiShield 1.0 here.

Re: Wifi with SD Card...

Postby ArdWifi » Thu Oct 28, 2010 11:05 pm

I would say that extra characters have been added somehow or that something has been uncommented or line breaks have changed place...

I will upload the spi.h to my website and post a link.
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

Postby bdodds » Fri Oct 29, 2010 10:15 am

I looking over the file to see if I can find extra stuff and try to learn what it is you did in it. I see it was not as simple as changing pin numbers!!! :shock:

Couldn't we let pin 9 run the connection Led like it did on the 328 instead of moving it to pin 48?
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 11:20 am

Yes if use pin 48 isn't defined itbwill use pin 9 i am using timer 2 for pwm in my project which is pin 3 on the 328 but pin 9 on the mega...

It still needed changing because it was port d on the 328 and became port h on the mega...
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

Postby bdodds » Fri Oct 29, 2010 11:24 am

Trying to wrap my brain around the port A,B,C,....,H thing still. :p
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 11:30 am

I had to refer to the schematic for the mega... If you look at that it shows you the pins and where they are connected to the atmega2560 chip which has 6 or so ports each with up to 8 pins so port a1-8 hoes to pins analog 1-8 or something...

Port h is pins 8 -13

So port h bit 2 is pin 9 or something
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

Postby ArdWifi » Fri Oct 29, 2010 11:36 am

http://arduino.cc/en/uploads/Main/ardui ... ematic.pdf schematic can be found here...

made a mistake port B is the one for 10 - 13

port h is 6 - 9

pin 9 is port H bit 6
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

Postby ArdWifi » Fri Oct 29, 2010 11:40 am

my spi.h can be found here... http://www.iscrobble.com/files/5912/8837/7611/spi.h
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

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

Hey I'm starting to get some of this hardware level stuff. :p

I see that you have it setup to use pin 9 (Bit 6 on Port H on the Mega unless you have the USE_PIN_48_ForLED in play.
Code: Select all
#define LEDConn_BIT               BIT6
#define LEDConn_DDR            DDRH
#define LEDConn_PORT            PORTH

What is the DDR line for?
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:12 pm

I have no idea... was DDRB for the mega 328 which was portB so I am guessing it must be some sort of register address

It didn't work until i changed it to DDRH
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

Re: Wifi with SD Card...

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

just done some reading and it is the data direction register... google is great! apparently its not a good idea to set it directly... but i guess there is a good reason...

http://www.arduino.cc/en/Reference/PortManipulation
ArdWifi
 
Posts: 44
Joined: Wed Feb 03, 2010 8:39 am

PreviousNext

Return to WiShield 1.0

Who is online

Users browsing this forum: No registered users and 1 guest