2
\$\begingroup\$

I have the task of implementing an embedded webserver (using ATMega328). Broadly, the system would provide the following functionality

  • Allow user to change system parameters using the web interface
  • Periodically check the time (using NTP or such) and update the internal RTC with the right time

My questions are

  • Should I go with ENC28J60 or Wiznet5100 or higher chip. ENC28J60 seems to be more popular with tonnes of tutorials, search results etc. But it seems that Wiznet5100 series come with integrated TCP/IP stack which should make things easier on the mcu side

  • Any suggestions for the web server? Ideally I would like it to look polished with images and such.

  • For time part, should I go with NTP or the simples (but older) alternatives such as daytime or time?

\$\endgroup\$
  • \$\begingroup\$ For a 328P you want the Wiznet, definitely. 2K is barely enough memory to store one ethernet packet, so the ENC28J60 stacks are seriously hacky and crippled. \$\endgroup\$ – Majenko Jul 10 '14 at 21:35
  • \$\begingroup\$ You'd probably be far better off throwing a decently chunky arm core at this project. There are ARM MCUs with built-in ethernet PHYs. It's not quite what you're doing, but here is a embedded STM32 based NTP server. \$\endgroup\$ – Connor Wolf Sep 9 '14 at 5:15
  • \$\begingroup\$ @Connor For this project I decided to go with wiznet5100. Intact its almost finished. What I would like to know is how big of a jump is it learning wise from atmega 8 bit mcu to the 32 bit ones? \$\endgroup\$ – Ankit Sep 9 '14 at 8:42
  • \$\begingroup\$ I did a project using some Atmel ATSAM parts recently. If you're using AVR Studio, it's not too big a leap. If you're doing it manually, it's probably a lot more work. What is this thing intended to actually do? A 8 bit MCU is generally pretty underpowered for anything expected to run a full TCP/IP stack. \$\endgroup\$ – Connor Wolf Sep 9 '14 at 9:30
1
\$\begingroup\$

Periodically check the time (using NTP or such) and update the internal RTC with the right time

Shouldn't be a problem although the Atmega328 doesn't have an internal RTC. It has a timer but that will fill up. You will need something like a DS1307 if you need an RTC.

Should I go with ENC28J60 or Wiznet5100 or higher chip.

The Wiznet would be preferable although you can opt for better security with their better stack or go with the ENC28J60 and get a strong community backing.

Any suggestions for the web server? Ideally I would like it to look polished with images and such.

While it won't make the greatest web-server, people have done this. I have been curious about it myself. Check out this very promising link

You won't be able to do too much with the server but you can do some basic GPIO, SPI, and I2C stuff.

For time part, should I go with NTP or the simples (but older) alternatives such as daytime or time?

This is entirely up to you

Good luck!

\$\endgroup\$
  • \$\begingroup\$ Thank you for the answer. Yes I do plan to use an external RTC chip. For the time protocol, it seems like time/daytime are simpler than NTP but have lower accuracy and are considered legacy protocols ever since NTP has came around. I don't need very fine time accuracy for my project, but want to ensure that there will be time servers available for the foreseeable future so that my coding does not go waste \$\endgroup\$ – Ankit Jul 11 '14 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.