Microcontroller Ethernet programming

Thread Starter

ExpL0siV3Man79

Joined Jun 4, 2018
93
I want to be able to programm my ATtiny84(or 85 ) through ethernet or Wifi . Is this possible ? If so how? I found an IC
(ENC28J60 Stand Alone Ethernet Controller)
that uses SPI to communicate with the μc .
 

BobaMosfet

Joined Jul 1, 2009
2,113
The ENC28J60 is NOT standalone ethernet controller. It is the PHYS side only. You need to write the entire TCP/IP stack to manage ethernet communications and utlize SPI to talk that controller.
 

hexreader

Joined Apr 16, 2011
581
What BobaMosfet said... plus

.... and tiny 84/85 is totally unsuited to Ethernet communication. Tiny 84/85 is well suited to flashing an LED really, really well. :)

Pick a more capable MCU.
 

BobaMosfet

Joined Jul 1, 2009
2,113
Nope but I couldn't find anything online about this type o programming so I just asked it here if anyone knows
You code in 'C' in most micro-controllers, and it's more a question of how much flash memory (where your code goes, kinda like RAM) the micro-controller has. Any 'tiny' doesn't have enough. You probably need something with 32K flash (like an ATMEGA32) at a minimum. Then you have to learn about TCP/IP enough that you understand the stack and how it works, let alone learning the 'C' programming language.

If you don't know how to program in 'C', and don't know TCP/IP well enough to code its logic, I'd recommend simply purchasing a ready-made microcontroller using the ENC28J60, or an STM32 ARM controller that already has ethernet capability built in.
 

Thread Starter

ExpL0siV3Man79

Joined Jun 4, 2018
93
I don't use C, I use C++ for arduino but I m a hobbyist . Till recently I only used arduino boards and tinys (for smaller projects such as drones etc) I know that there is a module for arduino that adds ethernet interface to the board but I am interested in creating my own board with built-in Ethernet , RS232 communication . I also added 2 I2C I/O expanders. One for Sensor reading etc and another for LCD driving
 

MrChips

Joined Oct 2, 2009
30,823
Creating ethernet support is not for the faint of heart. Most MCU and dev boards do not come with onboard ethernet connections. Usually these are add-on boards such as Arduino shields.

STM32F746GDISCOVERY does have the ethernet PHY and RJ45 connector onboard. The nice thing with this dev board is that it has a 480x272 colour touch screen LCD.
 

Thread Starter

ExpL0siV3Man79

Joined Jun 4, 2018
93
So if ethernet is not a must have for microcontrollers, what should I add? Bluetooth? Is there a way to make a diy Bluetooth module ? Wifi (same as Bluetooth here) .You may ask why you want to make your own module ? Well I just like to learn how stuff work by also making prototype models of them . For example I was into RF a week before and I created an RF transmitter module with a 555 timer chip on a stable mode with a frequency band for 60 to 350 kHz . Now I am studying to make a proper receiver . Let aside wireless communication. What about max232 ics around here ? As you know most modern computers don't come with a serial port . Can I convert USB to TTL or UART ? I ve seen FTDI chips but in my country they only come on smd mode and they are quite expensive around 7 to 8 € . Is there any other way ?
 

MrChips

Joined Oct 2, 2009
30,823
So you are motivated to learn. Today, you don't have to build your own USB, WiFi, or Ethernet interface. It is all done for you. If you want to learn the programming side of interfaces, go buy a Raspberry Pi.

If you want to do bare-metal interfacing, then any microcontroller will do, even your ATtiny84.
Start off with bit-banging a I2C interface. Get a I2C device, DS1307 RTC for example, and get that up and running.

Next, try a 1-wire interface, with something like an RHT03 temperature and humidity sensor.

Build your own 1-wire devices such as 7-segment LED display or 16 x 2 alphanumeric display.
Then you can integrate your RTC, temperature, RH, etc. all together with a single ATtiny84 or even an 8-pin ATtiny85.
 
Top