No Life

Post any hardware related questions about your WiShield 1.0 here.

Re: No Life

Postby benquark » Sat Jun 06, 2009 5:59 pm

I'm posting your solution from the Arduino forum for anybody looking for an answer on this forum.

From http://www.arduino.cc/cgi-bin/yabb2/YaB ... 716581/285
To all Arduino Mega Users:
To make the WiShield work on mega follow the NKC tutorial on wiring up the Ethernet shield http://mcukits.com/2009/04/06/arduino-e ... mega-hack/
and make the following changes to spi.h (in hardware\libraries\wishield):
Code: Select all
#define SPI0_SS_BIT      BIT0           
#define SPI0_SCLK_BIT    BIT1
#define SPI0_MOSI_BIT    BIT2
#define SPI0_MISO_BIT    BIT3

#define SPI0_Init()      PRR0 = 0x00;\
                         DDRB  |= SPI0_SS_BIT|SPI0_SCLK_BIT|SPI0_MOSI_BIT|LEDConn_BIT;\
                         DDRB  &= ~SPI0_MISO_BIT;\
                         PORTB = SPI0_SS_BIT;\
                         SPCR  = 0x50;\
                         SPSR  = 0x01

#define ZG2100_CS_BIT    BIT0

#define LEDConn_BIT      BIT5


I'll probably put it up on the wiki too. Thanks for the work :)
benquark
 
Posts: 63
Joined: Wed May 06, 2009 3:57 pm

Re: No Life

Postby SlvrSrfr » Fri Jul 10, 2009 1:34 am

For correct conn_LED parameters on the WiShield with Arduino MEGA,
Replace
Code: Select all
#define LEDConn_BIT          BIT1
#define LEDConn_DDR          DDRB
#define LEDConn_PORT        PORTB
with
Code: Select all
#define LEDConn_BIT          BIT6
#define LEDConn_DDR          DDRH
#define LEDConn_PORT        PORTH
The LED is a little dim so it takes some close inspection to see it's on.
Alternatively, use this to make use of the on-board LED, the one on the Arduino MEGA.
Code: Select all
#define LEDConn_BIT          BIT6
#define LEDConn_DDR          DDRB
#define LEDConn_PORT        PORTB
In fact, any digital pin can be used to drive an external LED for this purpose. The Arduino MEGA schematic should help. Hope this helps. :)
SlvrSrfr
 
Posts: 1
Joined: Fri Jul 10, 2009 1:25 am

Final Code

Postby theodoric » Fri Aug 27, 2010 7:21 pm

I am new to the C++ Scheme. Can someone post the finished SPI.H file. I am having trouble including all of the fixes required in order to use the Arduino Mega with the WiShield 2.0 .

viewtopic.php?f=13&t=80&start=10#p1888

Thanks,

Theo
theodoric
 
Posts: 1
Joined: Fri Aug 27, 2010 5:59 pm

Previous

Return to WiShield 1.0

Who is online

Users browsing this forum: No registered users and 1 guest