I just wrote a program for a Microchip PIC 18F14K22 microcontroller driving a ENC28J60 Ethernet controller in ASM. Because this PIC's SPI interface does not work in I bitbanged it,,, As this PIC has only 256 bytes of RAM.....
So far so good... But what does it do??? Well many things, but one of it is that it (oh it has a MAX232 too, ye know a MAXIM chip, I have some, the rumour that those do not exist is false, but you do not need the MAXIM chip you can do it with a NPN transistor and diode), so: It streams the serial port to UDP worldwide, sort of internet radio. At 115200 Bd it just about can send a 64 kbps mp3 worldwide, and you can just hang a player on it (xine, mplayer, ffplay, whatever, best something with a cache or buffer).
115200 Bd is 11520 bytes / second (1 start, 8 data, 1 stop bit), or 92,160 bits / second Add overhead for IP and UDP header... there you are: 64 kbps. Small packets, using a dual buffer in the 256 bytes RAM, while writing via serial interrupt, sending the other buffer via bitbang SPI to the ethernet controller.So how big is it? Well with my own designed UDP stack: just about 10000 bytes. Yes 10 KILOBYTES.
What more can it do? Oh I added about 2 kilobytes so it can also be used in 'listen' mode, and you can remotely set 2 digital outputs, read 2 digital inputs, read 4 analog
10 bit channels, and set 1 PWM output. For that you need no serial interface at all.. Of all that code size more then 10 % is test routines. Text takes a lot of space. So what OS? No OS. Total parts cost of the unit about 10 $ in small quantities.Who needs a 'computah' for remote telemetry :-) What 'bloat'?
Now there is free code space, free code space free code space, whatshallwedo with the free code space? I have some idea.