Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ATmega32 working with ENC28J60 for embedded web-server

Status
Not open for further replies.

m_pourfathi

Full Member level 4
Joined
Feb 7, 2008
Messages
200
Helped
17
Reputation
34
Reaction score
3
Trophy points
1,298
Activity points
2,579
enc28j60 avr

Hi all,
I am using an AVR ATmega32 Microcontroller with a MicroChip ENC28J60 Ethernet MAC and PHY layer device for implementing a mini web server. ENC28J60 uses spi interface to communicate with the microchip. Also I am using codevision compiler. I am checking my hardware first to see if AVR can communicate with ENC28J60 properly. But there's been this problem that AVR can't read data from ENC. for checking I am using this syntax:

SPDR = 0x15;
get_data = SPDR;
PORTA = get_data;
// Data read appears on PORTA for checking.

0x15 means read data from address 15 hex. what might be the problem? please help! thanks
 

enc28j60 atmega32

How is address 0x15 defined. If it is a register within the ethernet IC you should send the desired register first and then read from the device. Typically SPI devices does not have an address and makes use of a chip select or enable to activate the device.

Cheers
Slayer
 

atmega32 enc28j60

The address sent through SPI is for the ethernet IC memory. It has a ROM inside and there are about 40 or maybe 50 registers inside that can change some properties, like when do LEDs blink. I upload the datasheet so you can have a better understanding of the addressing I mentioned before.

thanks
 

atmega32 web server

Hi , tell me how your Initial SPI configuration is.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top