Embedded NTP client
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Embedded NTP client

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Eugen COCA
Guest





Posted: Sat Dec 10, 2005 1:15 am    Post subject: Embedded NTP client Reply with quote

Are there any public information regarding an embedded NTP client ? I
need to build a microcontroller based module to display the time
aquired from a NTP server via the Ethernet connection.
Back to top
karel
Guest





Posted: Sat Dec 10, 2005 1:15 am    Post subject: Re: Embedded NTP client Reply with quote

"Eugen COCA" <ecoca@eed.usv.ro> schreef in bericht
news:1134164957.748517.326410@g43g2000cwa.googlegroups.com...
Quote:
Are there any public information regarding an embedded NTP client ? I
need to build a microcontroller based module to display the time
aquired from a NTP server via the Ethernet connection.

If resources allow, run Linux and there's no problem left.
Since you need to implement ethernet anyhow,
the overhead might be acceptable.
Back to top
Markus Zingg
Guest





Posted: Sat Dec 10, 2005 1:15 am    Post subject: Re: Embedded NTP client Reply with quote

On 9 Dec 2005 13:49:17 -0800, "Eugen COCA" <ecoca@eed.usv.ro> wrote:

Quote:
Are there any public information regarding an embedded NTP client ? I
need to build a microcontroller based module to display the time
aquired from a NTP server via the Ethernet connection.

Since NTP is based on UDP and since it mens you only have one
connection at a given time cooking something around code talking to
the network hardware is fairly simple. The biggest challenge IMHO is
probably the DNS resolver. This makes sense cause for this kind of
application you may want to use pool.ntp.org as the time server and
not a fixed IP.

There's a technote from TI describing a little webserver
implementation with one of their micros. You can download it here.

http://www.softbaugh.com/downloads/slaa137.pdf

That's overkill since you don't need TCP, but it would show you how to
implement the ethernet & IP parts. Leaving TCP out and adding UDP
should then be fairly simple.

Using Linux as another poster sugested is of course possible, but to
me it looks like using a spaceshuttle to go to the next 7-11 store...

If you are in a hurry and quantity is low, I recommend rabbit cores
for this. They are dirt cheap and the SDK contains what you want.

www.rabbitsemiconductor.com

HTH

Markus
Back to top
Markus Zingg
Guest





Posted: Sat Dec 10, 2005 1:15 am    Post subject: Re: Embedded NTP client Reply with quote

Quote:
Are there any public information regarding an embedded NTP client ? I
need to build a microcontroller based module to display the time
aquired from a NTP server via the Ethernet connection.

After reading your post once more I realize that I may have
misunderstood you. If you only need information on how to use NTP,
simply use the RFC. NTP is extremly simple. You actually only format
one UDP segment, send it to the NTP server and get one back in reply.
You then read out the time and your are done.

http://www.faqs.org/rfcs/rfc1305.html is your friend here.

HTH

Markus
Back to top
Guest






Posted: Mon Dec 12, 2005 5:15 pm    Post subject: Re: Embedded NTP client Reply with quote

For displaying the time on a clock you probably want SNTP "simplified NTP."
The full NTP client does some statistical modeling to remove clock errors among multiple servers.
for a display clock there is no point in any acuracy better than 100msec or so.

Thus use SNTP, send a single UDP packet and recieve a single UDP packet.
One could probably do this without any kind of TCP/IP stack, just a direct
manipulation of the ethernet hardware.

Getting an IP address (DHCP,) and resolving a server name (DNS) are a bit more complicated,
but al three of these protocols are UDP based, so you only need the UDP portion of a
TCP/IP stack.


A simple NTP client is one of the example programs that ships with all of
our network development kits. (www.netburner.com) and we have several
existing customer shipping commercial "clocks".

Paul
CTO Netburner.com







On 9 Dec 2005 13:49:17 -0800, "Eugen COCA" <ecoca@eed.usv.ro> wrote:

Quote:
Are there any public information regarding an embedded NTP client ? I
need to build a microcontroller based module to display the time
aquired from a NTP server via the Ethernet connection.
Back to top
Guest






Posted: Mon Dec 12, 2005 11:16 pm    Post subject: Re: Embedded NTP client Reply with quote

As a follow up ..
SNTP is RFC 2030.
http://www.faqs.org/rfcs/rfc2030.html

Paul
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB