|
Mega Board working with WiShield Module

硬體要修改五條線:
MEGA pin 50 (MISO) to WiShield pin 12.
MEGA pin 51 (MOSI) to WiShield pin 11.
MEGA pin 52 (SCK) to WiShield pin 13.
MEGA pin 53 (SS) to WiShield pin 10.
MEGA pin 21 (SCL) to WiShield pin 2. (http://www.arduino.cc/en/Reference/AttachInterrupt)
---------------------------------------------------------------------------------------------------------------------------------------
Mega Board working with Ethernet Module. Ref link

硬體要修改四條線:
MEGA pin 50 (MISO) to Arduino Ethernet Shield pin 12.
MEGA pin 51 (MOSI) to Arduino Ethernet Shield pin 11.
MEGA pin 52 (SCK) to Arduino Ethernet Shield pin 13.
MEGA pin 53 (SS) to Arduino Ethernet Shield pin 10.
and we also need to Modify Software Lib file "WiServer.cpp" and "WiShield.cpp" abd "spi.h" (in hardware\libraries\wishield or hardware\libraries\ethernetLib)
#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
Reference from
http://asynclabs.com/forums/viewtopic.php?f=13&t=80
http://asynclabs.com/forums/viewtopic.php?f=13&t=19&hilit=mega&start=10
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235716581/285
http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235716581/420
目前有 0 篇回應... >> |