User Manual
Version 1.1
2011-07-15
 
  deRFnode and deRFgateway
 
 
 
 
dresden elektronik
ingenieurtechnik gmbh
Enno-Heidebroek-Str. 12
12 7 Dr
n
rm  n
Tel.: +49 351  31 85 00
Fax: +49 351  3 18 50 10
wireless@dresden-elektronik.de
www. r
n- l k r nik.
Page 48 of 56
 
If you like to access the external flash with an AVR MCU, a code snippet suitable for reading
the manufacturer and device IDs (see AT25DF041 datasheet, chapter 10) is: 
uint8_t i, data[4];
 
/* Set MOSI, SCK and CS output, all others input */ 
DDRB = (1<
DDRE = (1<
 
/* Enable the SPI interface, make the MCU SPI master */ 
SPCR = (1<
 
/* Select the serial clock SCK to be (FOSC/4) and double it 
 * (i.e. if CPU runs at 8MHz, SPI clock will be 4MHz) 
 */ 
SPCR &= ~((1<
SPSR = (1<
 
/* Start SPI transaction by setting CS low */ 
PORTE &= ~(1<
 
/* Send the command byte (Read Manufacturer and Device ID) */ 
SPDR = 0x9F;
 
/* wait for termination */ 
while (!(SPSR & (1 << SPIF))) ; 
 
for(i=0; i<4; i++) 
{
  /* Do dummy write for initiating SPI read */ 
  SPDR = SPI_DUMMY_VALUE;
 
  /* wait for termination */ 
  while (!(SPSR & (1 << SPIF))) ; 
 
  /* Upload the received byte in the user provided location */
  data[i] = SPDR;
}
 
/* Stop the SPI transaction by setting CS high */ 
PORTE |= (1<
 
/* check the read Ids (must be 0x1F,0x44,0x01,0x00) ... */ 
 
As like as in all previous chapters, a ready-to-use library is provided on the CD-ROM belong-
ing to the deRFdevelopment Kit.
9.4.6. Initialize and use the Ethernet transceiver
Only the deRFgateway boards are equipped with Ethernet circuitry hardware (PHY layer
transceiver). The EMAC must be implemented in software. Although it is not impossible to do
this with an AVR, we focus on using it with an ARM MCU here since as like as in all chapters
before the AT91Lib includes even this part.
Transceiver and MCU are connected via RMII (Reduced Media Independent Interface). To
save energy the Ethernet transceiver starts up in power-down mode (pull-down resistor on
相关PDF资料
3700BL15B100E BALUN CERAMIC CHIP WIMAX 3.7GHZ
4000BL14U100T BALUN CERAMIC CHIP UWB 4GHZ
4391-93 ATTENUATOR BNC MALE/FMALE 93 OHM
4432-T-B1 B 915 KIT DEV TEST EZRADIOPRO SI4432
5250AT43A200E ANTENNA CHIP 5.25GHZ WIFI
5250BL14B100T BALUN CERAMIC CHIP WIFI 5250MHZ
5250BL15B100E BALUN CERAMIC CHIP WIFI 5250MHZ
5325BL15B050E BALUN CERAMIC CHIP WIFI 5325MHZ
相关代理商/技术参数
3077-0-00-01-00-00-33-0 制造商:Mill-Max Mfg Corp 功能描述:
30770001 制造商: 功能描述: 制造商:undefined 功能描述:
3077-0-00-15-00-00030 制造商:Mill-Max Mfg Corp 功能描述:3077 DOUBLE TAIL HEADER PIN
307706 制造商:Weidmuller 功能描述:WBP-1/2IN NPT,STOPPING PLUG, -EA - Bulk
307707 制造商:Weidmuller 功能描述:WBP-3/4IN NPT,STOPPING PLUG, -EA - Bulk
307708 制造商:Weidmuller 功能描述:WBP-1IN NPT,STOPNG PLUG,BR -EA - Bulk
307709 制造商:Weidmuller 功能描述:WBP-1X1/4IN NPT,STOPNG PLUG, -EA - Bulk
30771 制造商:Alpha Wire 功能描述:Roll 制造商:Vicor Corporation 功能描述:HEATSINK VI-J00 TRANSVERSE 0.9" 制造商:Vicor Corporation 功能描述:VI-J00 heat sink 5 V output