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

TCP implementation using microcontroller

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Network
Author Message
chintan_jagani



Joined: 05 Jul 2006
Posts: 8
Location: Maharashtra,India


Post07 Sep 2006 14:54   TCP implementation using microcontroller

I want to implement all the TCP/IP layers into the microcontroller by myself to enable any serial device to communicate with a remote server through internet (not using any such readymade product). Which microcontroller should I use and what are the conducive features of this microcontroller that would be helpful to me in this project? What would be the price of this microcontroller?
Back to top
lambtron



Joined: 02 Nov 2005
Posts: 256
Helped: 26
Location: Portland, OR


Post07 Sep 2006 15:23   Re: TCP implementation using microcontroller

I presume you mean that you will write the firmware from scratch that will implement a tcp/ip stack? If so, almost any microcontroller will do the job.

If you will be handling ethernet packets, which can be as large as 1518 bytes, you will need enough ram to buffer 1518 times the number of pending receive packets. This will typically be much more ram than is included in a microcontroller, so you will most likely need to use external ram. This requirement may be reduced by limiting packet sizes, but you can run into compatibility issues. For example, what would happen if you receive a broadcast ping but it is larger than your maximum supported packet size?

Another option here is to choose a nic that employs a large internal buffer, such as a 91c111; this will ease (but not eliminate) the microcontroller's ram requirements. Keep in mind that ram is needed for other purposes as well, including heap space and quite possibly multiple stacks for multiple threads.

Speaking of threads, you will also need some sort of multitasking kernel. You can design this yourself, too, but it is mandatory. Without such a kernel you have no hope of managing tcp sliding windows or overlapped application transactions in a comprehensible way.

I have done this using the amd 80186er microcontroller in conjunction with a 91c111 nic. There is enough ram between these two devices to do the job (32KB on the microcontroller). And although you have not said anything about speed, the 80186er employs a 16 bit data path and runs fast enough to process over 1K packets per second (for small packets).

Microcontroller price depends on a number of factors including flavor (embedded peripherals such as your required asynchronous serial port, clock frequency) and quantity.
Back to top
chintan_jagani



Joined: 05 Jul 2006
Posts: 8
Location: Maharashtra,India


Post13 Sep 2006 18:47   Re: TCP implementation using microcontroller

Thank you for your response.

I wish not to use any computer at the side of my serial device and want to directly get connected to the internet through the modem, how could I perform tasks such as dialing of the modem without a computer? In other words how should I get directly connected to the internet through microcontroller if my server remains the same and how could I specify the server's address using microcontoller?

In short my connection goes this way,
serial device <=> serial to TCP <=> modem <=> internet <=> modem <=> remote server

Since I am a student correct me if I go wrong.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Network
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap