Snooping at the neigbours.. Found some code from HKipnik using the Arduino Mega W5100 ethernetshield with SD-card.
[img:b826199f40]http://members.home.nl/hobbycorner/images/w5100/ET_Shield_sur_MEGA.JPG[/img:b826199f40]
A little trick is used to change the SPI settings before accessing the W5100 or the SD-card on the SPI-bus.
The register SPCR is changed. Bit CPOL (Polarity) and CPHA (Clock Phase). This is done in the SD_card_init.inc (see attachment)
[img:b826199f40]http://members.home.nl/hobbycorner/images/w5100/SPCR-register.jpg[/img:b826199f40]
Thanks to HKipnik, nice trick. Hope you don't mind I am sharing this here.
Have fun
Ben Zijlstra
↧
Share your working BASCOM-AVR code here : Arduino Mega W5100 ethernetshield with SD-card : NEWTOPIC
↧