electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

ATmega32 working with ENC28J60 for embedded web-server


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> ATmega32 working with ENC28J60 for embedded web-server
Author Message
m_pourfathi



Joined: 07 Feb 2008
Posts: 237
Helped: 22


Post12 Jul 2008 5:22   

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
Back to top
Google
AdSense
Google Adsense




Post12 Jul 2008 5:22   

Ads




Back to top
Slayerza



Joined: 22 Oct 2005
Posts: 321
Helped: 22
Location: South Africa


Post14 Jul 2008 20:56   

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
Back to top
m_pourfathi



Joined: 07 Feb 2008
Posts: 237
Helped: 22


Post15 Jul 2008 5:17   

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



Sorry, but you need login in to view this attachment

Back to top
wishmaster2283



Joined: 20 Mar 2008
Posts: 1


Post22 Jul 2008 1:19   

atmega32 web server


Hi , tell me how your Initial SPI configuration is.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> ATmega32 working with ENC28J60 for embedded web-server
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Embedded web server (10)
Embedded Web Server (3)
embedded web server ...... (15)
Web Server Embedded controller (1)
need embedded web server (3)
Embedded Web Server Connection to the Internet (6)
Regarding EVB 8051---embedded web server (3)
AVR460: Embedded Web Server (Source code request) (1)
Web Server (4)
Web Server.. (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS