lambtron
Joined: 02 Nov 2005 Posts: 256 Helped: 26 Location: Portland, OR
|
07 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.
|
|
chintan_jagani
Joined: 05 Jul 2006 Posts: 8 Location: Maharashtra,India
|
13 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.
|
|