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
相關(guān)代理商/技術(shù)參數(shù) |
參數(shù)描述 |
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 |