If you must use ethernet, I’d recommend the enc28J60. Its about the easiest ethernet controller to interface to a micro that I know of; however ethernet isn’t the easiest protocol to implement [it needs a fair amount of code, especially for TCP/IP. less if you can use USB].
RE: regarding protocol selection, let us know a bit more about your application, especially with regards to datarate / what you’re interfacing to.
USB with one of the USB->serial IC’s would definitely be easiest, but I don’t know if that meets your needs.
busonerd:
If you must use ethernet, I’d recommend the enc28J60. Its about the easiest ethernet controller to interface to a micro that I know of; however ethernet isn’t the easiest protocol to implement [it needs a fair amount of code, especially for TCP/IP. less if you can use USB].
RE: regarding protocol selection, let us know a bit more about your application, especially with regards to datarate / what you’re interfacing to.
USB with one of the USB->serial IC’s would definitely be easiest, but I don’t know if that meets your needs.
Cheers,
–David Carne
Thanks for responding. The application is basically measurment of pH in the seawater. The project consists of two parts:
A module where AVR microcontroller and other sensors are located. The AVR/sensors in this module measures pH and communicate it to a laptop.
A software running on laptop communicate with the above module, receives pH information and sends some commands to that module.
The data rate is of no concern here. I just want to read data from the module and send some commands from laptop to the AVR module to take some actions.
Regards
PS
I forgot to mention. I am looking for something like plug and play type of things where I can hook it to AVR and start going. There might be something like this that you do not have to program anything and treat it just like a black boxe and snap it to your project and start communicating. Thanks
Both are possible. You will need either a USB host/device stack or TCP/IP stack. Maybe ethernet is a little simpler in implementation. If you use USB to serial dedicated IC (like FT232 or something) then you only need serial communication (UART)
USB to logic level serial as in FTDI’s chips or modules, is 100-fold simpler than ethernet. IMO, don’t use ethernet if you are just doing point to point data where a serial / USB link is sufficient.
stevech:
USB to logic level serial as in FTDI’s chips or modules, is 100-fold simpler than ethernet. IMO, don’t use ethernet if you are just doing point to point data where a serial / USB link is sufficient.
I think I will go the way of Ethernet. For two reasons:
Long distance is not problem
You can connect a bridge to it and make it wireless.
However, I have to learn from the very basics on how to use Ethernet to communicated between devices and microcontrollers. Are there tutorials for beginners? Where to start? Thanks
stevech:
USB to logic level serial as in FTDI’s chips or modules, is 100-fold simpler than ethernet. IMO, don’t use ethernet if you are just doing point to point data where a serial / USB link is sufficient.
I think I will go the way of Ethernet. For two reasons:
Long distance is not problem
You can connect a bridge to it and make it wireless.
However, I have to learn from the very basics on how to use Ethernet to communicated between devices and microcontrollers. Are there tutorials for beginners? Where to start? Thanks
Regards
Once again, what does your data look like? Is it really just “serial” data? Or do you want to add a web server to your microcontroller?
If all you need to do is get data from point A (your micro) to point B (a computer on ethernet), I would suggest a LanTronix module. Its a embedded serial server which trunks data from your TTL/CMOS level serial lines and sends it over TCP/IP to a computer.
If you want to go full bore, then you need to:
Implement an Ethernet MAC, or an adapter to an existing ethernet Mac.
Implement various protocols, such as ARP, IP, and UDP + TCP. If you have the RAM and code size, you can use an existing stack like uIP or lwIP.
Implement DNS resolvers
All of this will be a very very tight fit on most AVRs.
theatrus:
If all you need to do is get data from point A (your micro) to point B (a computer on ethernet), I would suggest a LanTronix module. Its a embedded serial server which trunks data from your TTL/CMOS level serial lines and sends it over TCP/IP to a computer.
.
I need to connect a device to PC. This connection can normally be using RS-232 serial communication. But now I have a requirement to replace this RS-232 connection with Ethernet connection. I hope I am clear. Thanks
smdFan:
I need to connect a device to PC. This connection can normally be using RS-232 serial communication. But now I have a requirement to replace this RS-232 connection with Ethernet connection. I hope I am clear. Thanks
.
Then a LanTronix XPort or MatchPort is what you want. It takes care of all the details with minimal fuss.
smdFan:
I need to connect a device to PC. This connection can normally be using RS-232 serial communication. But now I have a requirement to replace this RS-232 connection with Ethernet connection. I hope I am clear. Thanks
.
Then a LanTronix XPort or MatchPort is what you want. It takes care of all the details with minimal fuss.