Author Topic: Why are you still using 8 bit MCUs?  (Read 112782 times)

0 Members and 1 Guest are viewing this topic.

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #75 on: August 16, 2011, 01:39:53 am »
I just read this thread from start to finish.  What great entertainment.  You guys are too funny.

My favorite line in the whole thing:
I don't need a clock that can run Crysis. It should just display the time!!!

I loved the references to all of us having 64bit PCs/OS's cause the old 486s weren't enough.  Omg, please don't get me started on software nitwits turning great hardware into a boat anchor. 

We've got one guy who says he does graphic and video editing work and he is waiting for when pc's are 10x as fast as today...  I wanted to ask, do you have any clue how fast the PC is you're sitting in front of?  Any comprehension at all?  Want it to go faster? Get rid of the abortion OS you're running.  If things are going slow, it's cause your software is written by some nitwit who thinks your x64 processor is plenty to make up for him programming video software in Visual Basic.  You only think faster hardware is the cure  because new hardware is the only bandaid available for you to buy.  There is multiple orders of magnitude more performance to be had with a change in software, not that you'll ever have a chance to buy it. 

Yes, let's move to the next series of u-processors for all applications.  Lets see if a newer chip with an order of magnitude more power, is enough to make up for a designer with an order of magnitude less brains.
EEVBlog: The first forum you need a calculator to post on...
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: Why are you still using 8 bit MCUs?
« Reply #76 on: August 16, 2011, 02:02:11 am »
I wanted to ask, do you have any clue how fast the PC is you're sitting in front of?  Any comprehension at all?
Case in point, I was just recently timing some complex number crunching code involving thousands of double precision computations. Running the code on a recent, but not latest and greatest, P8800 CPU. Do you know how long it took to do those thousands of computations? It took 40 microseconds. That's not milliseconds, that's microseconds.

So yes, the machine sitting on your desk is most likely unbelievably fast. If you tried to run the benchmarks that were usual for a 50 MHz 486 on such a modern machine they wouldn't work, the benchmark would be over before you had finished pressing the enter key.

One of the fundamental laws of programming is that programs expand to consume the available resources as fast as the hardware improves. If your computer gets 1000x faster, your experience will remain 1x faster, the same as it was before.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9007
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Why are you still using 8 bit MCUs?
« Reply #77 on: August 17, 2011, 02:38:14 am »
Quote
Actually -- they do -- but mainly because the likes of Microsoft have created some *horrendously* bloated and slow code in their efforts to make our PCs more user-friendly and powerful.

If you ever get the chance, fire up an old 4MHz Z80 CP/M based computer and have a play with the software of the era.  You'll be surprised at how sprightly an 8-bit computer running with a clock speed that is three orders of magnitude slower than today's desktop computers can be.
I optimized my PC at work today and it's amazing just how much faster it becomes. First, I turned off all the unnecessary Windows effects. That made a great improvement but it still felt a little slow. Then I went into the BIOS and found a "high performance mode", which seems to force the fan to full speed and change some clock settings. It appears to default to only allowing the higher clocks for a short time, but turning on "high performance mode" lets the CPU run at the highest clock for an unlimited time if it needs to. I'm not sure why that option even exists, but I think it's a failed attempt to save energy without making the computer feel slow.
Quote
You're right, there are applications which need a lot of power, such as some complex mathematical problems which require an exponential increase in computing power to solve at twice the speed i.e. the travelling salesman problem.
Assuming your problem is limited by clock speed, doubling the clocks (assuming same basic architecture) will cause the problem to be solved twice as fast unless something else becomes the bottleneck. It is true, however, that many algorithms need more than twice the clock cycles when the data set is doubled.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Why are you still using 8 bit MCUs?
« Reply #78 on: August 17, 2011, 05:06:41 pm »
The hard drive seems to be the greatest bottleneck in most common tasks on modern PCs. If you want performance, try upgrading from 7200rpm to 10,000rpm and if that's too slow, consider a flash or hybrid drive.
 

alm

  • Guest
Re: Why are you still using 8 bit MCUs?
« Reply #79 on: August 17, 2011, 06:01:38 pm »
I loved the references to all of us having 64bit PCs/OS's cause the old 486s weren't enough.  Omg, please don't get me started on software nitwits turning great hardware into a boat anchor. 
Of course software gets more bloated as the hardware gets faster, it's just not economical to spend labor to improve the speed beyond what's necessary for current hardware. Don't forget that modern software does a lot more than old software. Compare for example modern webbrowsers (which use a lot of RAM and CPU) with the ones that used to run on a 486. The latter will barely have javascript support, the rendering will be very primitive, no cascading style sheets that can transform the look of the page, very limited history, and so on. People also tend to idealize old stuff, and remember it faster and more functional than it really was.

We've got one guy who says he does graphic and video editing work and he is waiting for when pc's are 10x as fast as today...  I wanted to ask, do you have any clue how fast the PC is you're sitting in front of?  Any comprehension at all?
Just because you couldn't use more power doesn't mean that no-one else does.

Want it to go faster? Get rid of the abortion OS you're running.
If your OS is using a significant amount of CPU when it's not booting or updating, your computer is either too slow for the OS or something's wrong. Even a stock Windows install will usually idle at a very low CPU usage. Of course installing crap like some virus scanners doesn't help.

There is multiple orders of magnitude more performance to be had with a change in software, not that you'll ever have a chance to buy it. 
The largest gains usually come from changes in algorithms. But there's only so much you can do, at some point the hardware has to take over. Some applications just weren't feasible before faster computers came around, even with careful programming, or are still not feasible today.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: Why are you still using 8 bit MCUs?
« Reply #80 on: August 17, 2011, 06:13:00 pm »
The hard drive seems to be the greatest bottleneck
i was confused this with hard drive "size". with majority of "blind pc performance" community around me, RAM is major bottleneck here, not hdd. i believe i can easily find a PC running Win7 with 512MB RAM around here (or maybe 1GB only), due to sellers want to compete cheap PC price, they reduced the RAM size. so 8GHz 8 core pentium running XP is no better than my 2GHz 4 core pentium. yes, my system bottleneck is HDD i think. my friend used to tell me to upgrade to 64bit machine, i dont know, he used to exagerate things, i prefer to stay with the majority, 32bit :(
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #81 on: August 17, 2011, 08:47:32 pm »
Of course software gets more bloated as the hardware gets faster, it's just not economical to spend labor to improve the speed beyond what's necessary for current hardware.
My entire point was that the guy wants more speed, and a programmer worth their salt could give it to him.  All the hardware needed is sitting there in front of him.
Quote
Don't forget that modern software does a lot more than old software.
Yes it does.  Like, checking a jpg to see if there is something in it to execute so a virus has a way to become a reality.  Ever hear of "Data Execution Prevention"?  Wtf is there in "DATA" that needs executed?  Want a good example of wasted cpu cycles, don't read a data record from an SQL DB table and then check the contents to see if there's an exe header in there, then worse yet, act on it.  IT IS DATA.  What are we looking at that for?  Anyone want to answer that?  Ahhhh, yes, we do that so some dumbass doesn't have to remember that EXEs are executables.  They can type whatever errant syntax they want and 'something' will run.  Now we even check arbitrary data files for content that doesn't belong just in case... whatever...

Call up a "Folder" in Windoze.  Why does it read every single file in that folder to get an icon from it.  If there are 20k files in the folder, then it takes an hour to get the folder contents on the screen.  I have done programming in C and done my own "directory" accesses.  It does not require pretty pictures.  Nobody cares about an icon that's 12px sq and was resized from an image 150px square, just to show what type of file it is in a folder listing.  Alphabetize and forget it.

Quote
Compare for example modern webbrowsers (which use a lot of RAM and CPU) with the ones that used to run on a 486. The latter will barely have javascript support, the rendering will be very primitive, no cascading style sheets that can transform the look of the page, very limited history, and so on. People also tend to idealize old stuff, and remember it faster and more functional than it really was.
My memory of Cascaded Style Sheets appears better than yours.  They were and still are extremely powerful formatting tools, that worked at light speed on ANY platform.  Truly, I think you are discussing software performance with the wrong guy.  My guess is that you may even believe that the pretty little rounded edges on your windows do not cost a fortune in system performance, no?  That's a lotttaaaa matthhhh, unnecessary mathhhh.  Transparency, translucency, all this pretty window crap.  For what?  Did you really think you became more productive on your Win7 system because of that pretty window rubbish?  I think not.  Would everyone be happier if their system went faster?  I think so.  But, that would put a big damper on hardware sales.

Quote
Just because you couldn't use more power doesn't mean that no-one else does.
All I'm saying is I know where the wasted power is at...

Quote
If your OS is using a significant amount of CPU when it's not booting or updating, your computer is either too slow for the OS or something's wrong. Even a stock Windows install will usually idle at a very low CPU usage. Of course installing crap like some virus scanners doesn't help.
My new system is as clean an install as I can make it. No virus software, no anti-spyware crap, nothing of the sort.  Not even running windoze firewall.  I type this now on an Ubuntu system here at work. I have 5 pcs, all with different OS's.  XP, 7, FC14, U11.04 and FC7.  FC and U have many the same problems with disk as does windows.  Just open a window with /usr/bin and you'll get the picture.  Wth is all that reading about, display the damn folder already. More reading of shit I don't care to see.  Nor does anyone else.  But I would like to see the folder contents before retirement...

Quote
The largest gains usually come from changes in algorithms. But there's only so much you can do, at some point the hardware has to take over. Some applications just weren't feasible before faster computers came around, even with careful programming, or are still not feasible today.
Well, I guess you needed to spend a little time on an old IBM 360 mainframe to really get the idea what performance per/hz means. 

Efficiency of software is a very achievable goal.  The trouble with algorithms is that they were already figured out years ago to be as efficient as they could.  Its the platform upon which they are used today that slows them down.  See, folks years ago were not nearly as inept as some today would like to believe.  They could do math years ago too.  Maybe a bit better than folks of today I might add.  I hate to sound the way i'm coming off, but honestly, you have demonstrated unfamiliarity with many of the facts.  I'll just close with this and hope it gives some frame of reference.

Google.  Go do any search.  Take a look at how many results there are.  Consider the time it took to do the search.  Consider the archive of data that was just parsed.  There were millions of hits on just the words you chose.  Go page through them, see if they don't actually apply to what you asked.  It isn't black magic.  No Voldemort involved.  This is an efficient data processing system.  And, while were on the subject of perspective, consider that you're not the only person using google today.  Search for images once.  Search for anything.  Do you not think they are dealing with more data than a video file?  A day or so from now, maybe a few hours, you can search on an exact line of the text I've just typed and IT WILL probably FIND IT.  Might have to do an advanced search to get it, but, it's hard to comprehend. 

They did not achieve this by asking Billybob to code up some bloatware OS.  You might say, well, it doesn't pay to do worthwhile coding cause nobody needs it with todays hardware.  Well, evidently by the responses above, oh yes they do.

Mechatrommer, you need to pick up a SSD and you'll see where the bottlenecks are in a system.  "The weakest link is the strength of the chain".  Spinning HDDs have seek times well in the ms, not ns.  My new system for instance has an OCZ Solid III Sata3 SSD. 500MB/Sec sustained read, 475MB/Sec sustained write.  It will make an order of magnitude change in a system having something like this, and my CPU is a Phenom II Quad 980 at 3.7Ghz. Not overclocked. Plenty of CPU.
EEVBlog: The first forum you need a calculator to post on...
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why are you still using 8 bit MCUs?
« Reply #82 on: August 17, 2011, 09:31:40 pm »
Quote
thousands of double precision computations. ... It took 40 microseconds.
Yeah, now run that on each pixel of an a 1080p display (about 2e6 of them), for 30 fps of 2 hours of video, and you'll really want a faster computer.

There's a lot of crappy software out there, but not all of it is subject to "orders of magnitude improvement."  For the software that's really slow, there are people willing to PAY BIG BUCKS for orders of magnitude improvement.

If you do have the speed (and memory, etc)e, you might as well spend it making your UI look pretty.  I remember when you could easily put together a really zippy linux system on a pretty minimal system.  Most of your interaction was via a shell in a B&W X-window, though, and not many people wanted to use them.  A modern linux (KDE, Gnome, etc) is nice enough to give to mundanes, but it's also almost as bloated and slow as windows/etc...
 

alm

  • Guest
Re: Why are you still using 8 bit MCUs?
« Reply #83 on: August 17, 2011, 10:45:08 pm »
My guess is that you may even believe that the pretty little rounded edges on your windows do not cost a fortune in system performance, no?  That's a lotttaaaa matthhhh, unnecessary mathhhh.  Transparency, translucency, all this pretty window crap.  For what?  Did you really think you became more productive on your Win7 system because of that pretty window rubbish?  I think not.  Would everyone be happier if their system went faster?  I think so.  But, that would put a big damper on hardware sales.
Meh, gives the GPU something to do. Until the GPGPU stuff really takes off, there's not a whole lot to do for the GPU with typical desktop applications. Yeah, it will probably increase power usage slightly (though less than doing the non-translucent straight corners in the CPU). I'm sure you can easily turn it off if you're so inclined, but unless your app consists of drawing tons of windows on the screen, this is hardly a big deal.

Wth is all that reading about, display the damn folder already. More reading of shit I don't care to see.  Nor does anyone else.  But I would like to see the folder contents before retirement...
When people are talking about orders of magnitude improvement in performance, it's usually the heavy loads, like rendering a video. The small delays in daily use are merely an annoyance, in my opinion. ls is usually fast enough unless the filesystem is the botteneck (eg. 100k files).

Well, I guess you needed to spend a little time on an old IBM 360 mainframe to really get the idea what performance per/hz means. 
How responsive were photo editing applications on that mainframe? How many HD video streams could they play at the same time?

Efficiency of software is a very achievable goal. The trouble with algorithms is that they were already figured out years ago to be as efficient as they could.
Assuming they already existed back then. For example, some image processing algorithms are fairly recent for the simple reason that digital images became abundant only recently. Sure, all of the basic math stuff like FFT was figured out many years ago. Many people use a library like fftw for this, which provides a fairly efficient implementation.

Its the platform upon which they are used today that slows them down.
How do translucent windows and thumbnail images in folder views slow down the FFT?

I hate to sound the way i'm coming off, but honestly, you have demonstrated unfamiliarity with many of the facts.
Facts? Where?

Google.  Go do any search.  Take a look at how many results there are.  Consider the time it took to do the search.  Consider the archive of data that was just parsed.  There were millions of hits on just the words you chose.
This is a completely different problem they're trying to solve. Of course their algorithm and implementation is extremely optimized. They also throw as much hardware on it as necessary, since they consider performance one of their prime targets. They can pre-process the data, since they spend much more time querying it than collecting new data. They have many servers and many queries, so they can spread the load and avoid peak loads. If your query takes ten times as much processing power, they can easily provide it as long as not everyone else is executing a query of similar complexity at the same time. If you need ten times more processing power to edit your video, you can't just borrow 9 CPU's from your neighbors. Not saying they're not solving a very hard problem, but it's not the same problem that requires a fast desktop PC.

They did not achieve this by asking Billybob to code up some bloatware OS.
They run the same OS that takes half a minute to display the contents of /usr/bin.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: Why are you still using 8 bit MCUs?
« Reply #84 on: August 17, 2011, 11:10:40 pm »
My guess is that you may even believe that the pretty little rounded edges on your windows do not cost a fortune in system performance, no?  That's a lotttaaaa matthhhh, unnecessary mathhhh.  Transparency, translucency, all this pretty window crap.  For what?  Did you really think you became more productive on your Win7 system because of that pretty window rubbish?  I think not.  Would everyone be happier if their system went faster?  I think so.  But, that would put a big damper on hardware sales.
let me join in! that cost millions of people lose billions of dollars to bill gates for win7. productive? yes psychologically to the millions people out there (with proper neck tie and skirt). if not then tell me... what are you going to do with GHz of CPU and GPU? GB of RAM and HDD? NASA or CERN Simulation? statistic saying, computer do alot more waiting for us (not me not you, the tied guys and the skirted girls) to press the next key on the keyboard. call that a waste? well, its millions of waste. not to mention the kids watching porno.
« Last Edit: August 17, 2011, 11:34:36 pm by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #85 on: August 18, 2011, 03:33:47 am »
I wont bother with a boatload of quotes...

@Westfw.
First, you don't need to do those sorts of computations on 1080 video.  You get a stream of data from a blu-ray, send it unchanged to a GPU that has HD video decoding in hardware, and it sends the stream to the display after uncompressing it.  The compression is very rudimentary, it's not fixed, there's actually fuzzy logic in the process.  One decoder will actually generate a different image than another.

The rest of your post tells me you've given in like the others to thinking that there is some tradeoff that has to be made. Some "bargain with the devil" if you will, to get the system to go faster.  There isn't.  Your last statement is exactly the mindset of the programmers both doing lazy PC Os work, and wasteful microcontroller work.  "Well, here's all this power, let's waste it...  What else are we gonna do with it?"   Well, there's no reason you can't "Have your cake and eat it too".  The desktop can be just as pretty or very nearly so, and still go fast. 

I could use the same reasoning you guys are using, but apply it to developers/programmers.  Well, we've got all these out of work software developers, maybe they ought to get off their duffs and write some decent code and they wouldn't be out of work.  Here they sit unemployed, let's just waste all this programming talent cause we've got lots of it.  Same thing isn't it?  Sort of ironic I say.  Here in the US, there's an epidemic of unemployment for software developers and high tech jobs of all sorts.  Yet, all of them are looking for ways to develop things so wastefully in so little time, they are now out of work.   Hmmmm.. food for thought.   I bet right about now there's a whole bunch of designers of both hardware and software who wish they had some work in Assembly code or 8 bit mcu's to do...

@alm
Quote
Meh, gives the GPU something to do. Until the GPGPU stuff really takes off, there's not a whole lot to do for the GPU with typical desktop applications. Yeah, it will probably increase power usage slightly (though less than doing the non-translucent straight corners in the CPU). I'm sure you can easily turn it off if you're so inclined, but unless your app consists of drawing tons of windows on the screen, this is hardly a big deal.
Yes, you can choose a windows classic desktop or linux theme that does not have those rounded corners and turn at least that stuff off.  As to it not being a big deal, your system draws the same windows all the time, and yes it is very much a big deal. Very noticeable, as mentioned also by another poster way above here.  There is a huge performance increase just in the "Performance" tab of system properties by turning off many of the UI effects. I bet 80% of those are not even noticed by any user (speaking aesthetically now).  I leave on a few, but they either have value, or no cost in performance.  I use the Translucent Selection window.  Full Window Drag.  Clear Type Text.  There may be 1 or 2 others, but I turn off everything else.  Makes a huge difference in everything you do.

Next ppg.
Again, I disagree.  I would say for large loads, depending on the data handling, there is less steady state performance to be gained than there is misc gain in all these little wasteful UI processes going on.  But unfortunately, those are killing that large workload and keeping it from doing what it should (which is complete the big job).  I don't think you're aware of how much this pig UI is crippling even the more efficient parts of the system. 
Another comparison.  Back in the Win98 days, you had "Smartdrv.exe".  A configurable disk cache.  It could make disk transfer order of magnitude faster.  It is gone now, and there is nothing like it.  Now, we have enough ram unused that it is equivalent to the HD size we had then.  But, we can't use it for disk cache.  Why?  Go copy a 1080 Mkv video file from one hard disk to another.  With adequate free space, any cheezy hd will read or write 65MB/sec.  I can transfer 130MB/sec over my home network.  (actually a cheat cause I can move data over the network from pc to pc faster than I can from one drive to another in the same pc).  No raid...  a 30G file will take eh, 4 to 7 minutes depending on what throughput you get.  But, now copy one file, and start a second simultaneous copy.  Now, due to the drive access method, the speed will drop and it will alternate between jobs.  Now those two files instead of taking 8-14 minutes will take 3-5 hours.  Inefficient...  Not hard to fix at the OS level. Impossible to fix at the user level.  Oh, and this happens while we have 6.5GB of free ram in the system that is sitting idle instead of being used for disk cache.  And to add to that, we have 6.5GB of free ram and the OS is still hitting the swap file every second.  Go ahead, explain that reasoning to me. 

Quote
How responsive were photo editing applications on that mainframe? How many HD video streams could they play at the same time?
Unbelievably responsive.  yes, they did image work, and in fact, if you look at your current copy of windoze, it'll still have reference to Wang Labs rights to imaging algorithms, very much in use then and now, both on mainframes and pcs.  Actually, I worked on a 370 system at a local community college that had a CAD system on it, 32 dumb terminals via sna. Beautiful 24" color monitors. Holy expensive...  What would take a pc using Autocad 2 min to draw, it would put on the screen of any of those terminals as fast as the refresh rate.  POW!  mind blowing speed.  Yes, they could have run all the video they wanted.

I was also a dealer for Autodesk then, and there was a company making a video card that had a dongle associated with it, and a "driver" "Optimized" for Autocad.  Was all bs.  You could put that dongle on any pc and get the full 40x performance increase in regen's and re renders.  Just load the "drivers" that fixed the shit code from Autodesk.  You didn't need the crappy cirrus logic crap video card they sold for perverse money.  This was an entire industry of selling snake oils.  Much like now.  They Want the stuff to run slow.  It's more profitable.

Quote
How do translucent windows and thumbnail images in folder views slow down the FFT?
TW's and thumbs (implementation and overhead) slow your system to a crawl, all the time. Mostly its the generic, do-everything-every-time mentality of disk access that kills pc os performance.  Win/Linux alike. 

But, a better question might be, wth does FFT have to do with the performance topics of either software or hardware at the PC OS level, or the uC level?

Quote
Facts? Where?
Facts about software performance.  Facts about how the filesystem implementations have far reaching affects to total system performance.  About how programming efficiency, even on a uC, has benefit beyond the shortsighted aims of many designers.  And, while it may or may not be a fact, it is my opinion that the argument where peoples time isn't worth the performance gains to be had, is patently false.  There is a balance somewhere between man hours development time vs system performance / user experience.  Ok, I'll agree that.  But, you seem very distant in your opinion that the current lack of performance in our OS lets say, is either my imagination, or justified due to todays hardware.  I'm on the other end of the world with my opinion, I think with minimal effort, huge gains are there to be had if anyone cared. 

To put it better, our tools we have to work with are built with such bloated libraries (which we are forced to use in many cases), that no matter how we try to make our stuff efficient, we're restricted in what we can achieve.  It appears to me that you think this justifies our lack of effort, I do not. 

The google example fits.  Data is data.  It doesn't become something other than 1's and 0's just cause it's a blu-ray movie.

Quote
They run the same OS that takes half a minute to display the contents of /usr/bin.
Couldn't have said it better myself.  I think you just made my point.  They took the same bloated OS that won't list a hard disk directory in 5 sec, re-worked the thing stem to stern, and made it search all data on earth in .01
EEVBlog: The first forum you need a calculator to post on...
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #86 on: August 18, 2011, 04:02:13 am »
Here's an interesting irony too.

The Op, along with others in this thread, advocates the use of more processor than may be needed for the job, in the interest of reducing part count, ease of development (need to know less parts) and feels cost is a wash.  Not debating any of that.  Then almost opposite that mindset, you brought up the slow adoption of using GPU for processing, and I agree.  Here's Microsoft and all PC OS developers who have had this capability since back in the early 90's, yet never used it at the desktop level.  ???  I bet by the late 90's, every pc on the market had a 3D graphics card capable of doing incredible amounts of processing, but sitting idle unless we played a game.  Why is that? 

One group want's more cpu even if there isn't work to do.  The other group has more computing power unused than used, but won't use more.  :D
EEVBlog: The first forum you need a calculator to post on...
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Why are you still using 8 bit MCUs?
« Reply #87 on: August 18, 2011, 05:25:48 pm »
Yes it does.  Like, checking a jpg to see if there is something in it to execute so a virus has a way to become a reality.  Ever hear of "Data Execution Prevention"?  Wtf is there in "DATA" that needs executed?  Want a good example of wasted cpu cycles, don't read a data record from an SQL DB table and then check the contents to see if there's an exe header in there, then worse yet, act on it.  IT IS DATA.  What are we looking at that for?  Anyone want to answer that?  Ahhhh, yes, we do that so some dumbass doesn't have to remember that EXEs are executables.  They can type whatever errant syntax they want and 'something' will run.  Now we even check arbitrary data files for content that doesn't belong just in case... whatever...

You don't even know what data execution prevention is, let alone why it's a very good idea. On modern computers data execution prevention is primarily by the hardware and doesn't require any extra clock cycles. It is a good security feature because it helps to prevent buffer overrun vulnerabilities in the software from executing malware. This is when a harmless file such as a JPG is loaded and there is a vulnerability in the software that can cause the program counter to be set to where the data is loaded. Normally such a vulnerability will just cause the program to crash but if the JPG contains valid machine instructions it won't and if it's a virus you're buggered.

Quote
Call up a "Folder" in Windoze.  Why does it read every single file in that folder to get an icon from it.  If there are 20k files in the folder, then it takes an hour to get the folder contents on the screen.  I have done programming in C and done my own "directory" accesses.  It does not require pretty pictures.  Nobody cares about an icon that's 12px sq and was resized from an image 150px square, just to show what type of file it is in a folder listing.  Alphabetize and forget it.
Is this on your new machine with a flash drive? If so you definitely have malware in there. I have 1GB RAM, a single core 2GHz processor running XP and a fast 10,000 mechanical hard drive and it takes a couple of seconds at most to load a folder containing hundreds of pictures totalling nearly 700MB.

Quote
I type this now on an Ubuntu system here at work. I have 5 pcs, all with different OS's.  XP, 7, FC14, U11.04 and FC7.  FC and U have many the same problems with disk as does windows.  Just open a window with /usr/bin and you'll get the picture.  Wth is all that reading about, display the damn folder already. More reading of shit I don't care to see.  Nor does anyone else.  But I would like to see the folder contents before retirement...
Linux had data execution prevention long before Windows did and is one of the reasons why many preferred Linux at the time. I've dabbled with Linux too but I haven't really noticed it being any faster or slower than Windows.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: Why are you still using 8 bit MCUs?
« Reply #88 on: August 18, 2011, 06:13:39 pm »
you can still setup DOS in your system if you want faster performance, or XP like me :P talking about virus, avast is good in term of performance/overhead. i never felt the presence of it or overloading the cpu performance. last time i used norton antivirus which in each new version on faster machine, it runs slower, now for me norton no anymore, but it was good, esp on file defragmentation program. OTOH, one thing i hate about win7 is its start menu system is less productive imho compared to win XP, and it doesnt help in better aesthethic as well. ie win7 overlay the higher level submenu on top of lower one making it difficult to go back few menu level, not like XP with older style start menu, its popped up to the right with lower level menu still visible i can move my mouse to anywhere in the menu level. i tried to find the setting to go back to old menu style in win7 but cant find it.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #89 on: August 19, 2011, 04:25:07 am »
Quote
You don't even know what data execution prevention is, let alone why it's a very good idea. On modern computers data execution prevention is primarily by the hardware and doesn't require any extra clock cycles.
My point there was, why is it necessary?  Not any performance impact, but the idea that 'data' has something executable in it, a virus lets say.  It is loaded up into memory in it's entirety, meaning all file headers get brought in as well, even tho this is a data file and you should have already stripped all that since it really isn't "data".  So it's been put in ram quite consciously, then, an event occurs that would most likely cause a BSOD, but oh no, somehow it ends up making a call to a location in ram where this virus just "happens" to be, and without accidentally landing off an instruction boundary, this code begins to execute.   Hmm, sounds like a bit of a stretch to me.  Methinks somebody wants this malware to execute and already had all the control over the system they needed.  And, if the malware is what's making this call, then I guess our goose was cooked before any jpg got loaded anyway wasn't it.  Still no need for DEP.  Or well, it does nothing.  Oh, and how's it doing at stopping all the malware anyway? 

But you believe this is an every day occurrence that all these conditions just happen to line up?  Seriously, someone can stick executable code inside a jpg and it'll somehow run, cause it just magically takes over the program counter?

It doesn't matter if it's direct or indirect, its effects are still there. 

Quote
OTOH, one thing i hate about win7 is its start menu system is less productive imho compared to win XP, and it doesnt help in better aesthethic as well. ie win7 overlay the higher level submenu on top of lower one making it difficult to go back few menu level, not like XP with older style start menu, its popped up to the right with lower level menu still visible i can move my mouse to anywhere in the menu level. i tried to find the setting to go back to old menu style in win7 but cant find it.
That is because MS doesn't want you to be able to use the menu you've known for the past decade or so.  It MUST be redesigned and you must be forced to use the cell phone interface they've now got.  What a piece of s....

Without loosing the menu w7 came with (in case some functionality is still needed), you can still load up Classic Shell and have both. It fixes some of the other dumbass stuff Ms did to explorer, but of course it doesn't fix everything.
EEVBlog: The first forum you need a calculator to post on...
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #90 on: August 19, 2011, 04:30:19 am »
Quote
you can still setup DOS in your system if you want faster performance,...
Actually, that's not true on a new system.  The lower memory layout has changed and so DOS won't actually work on a new motherboard.  Been that way for a while now, though I won't guess on an exact time.
EEVBlog: The first forum you need a calculator to post on...
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: Why are you still using 8 bit MCUs?
« Reply #91 on: August 19, 2011, 08:06:51 am »
But you believe this is an every day occurrence that all these conditions just happen to line up?  Seriously, someone can stick executable code inside a jpg and it'll somehow run, cause it just magically takes over the program counter?
It doesn't "just happen" and its not "magic", it is quite intentionally and deliberately achieved. You still don't quite understand, apparently, how easily unpatched vulnerabilities in almost any code running on your system can be exploited to let people compromise your machine. If you have not applied all the latest updates to Windows, Flash, Adobe Reader, Firefox etc. your machine is like a house with all the doors and windows unlocked just waiting for someone to take it over. DEP is one layer of protection to help stop this from happening.

Now of course it's true that some of those vulnerabilities should never have been there in the first place and Adobe is one of the worst offenders in this regard, but since many people run with Adobe crapware on their machines then at least keeping the crap up to date is essential.
 

Offline sub

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: Why are you still using 8 bit MCUs?
« Reply #92 on: August 19, 2011, 08:23:10 am »
So it's been put in ram quite consciously, then, an event occurs that would most likely cause a BSOD, but oh no, somehow it ends up making a call to a location in ram where this virus just "happens" to be, and without accidentally landing off an instruction boundary, this code begins to execute.   Hmm, sounds like a bit of a stretch to me.  Methinks somebody wants this malware to execute and already had all the control over the system they needed.
The idea is that an error in the code causes the data to be written past the end of the buffer and over the top of the function's return address.  Then at the end of the function the program faithfully loads up this return address and jumps to the hostile code that was inserted into the data.    These indeed normally cause segfaults (not BSODs) as you said, but sometimes the fault in question does not occur in normal operation and so is not found during testing.

Various types of protection will stop the return address from being overwritten or the jump from succeeding.

Quote
But you believe this is an every day occurrence that all these conditions just happen to line up?  Seriously, someone can stick executable code inside a jpg and it'll somehow run, cause it just magically takes over the program counter?
In some (most? all?) calling conventions the address to which one must return is placed in the stack before memory for data is allocated.  If the program writes past the end of one of its buffers, it may well be able to keep going until it hits this address, in which case one can construct data that will change it to point to hostile code contained in the data.

Here are some articles describing how these exploits work: http://www.linuxjournal.com/article/6701, http://en.wikipedia.org/wiki/Buffer_overflow
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #93 on: August 19, 2011, 02:35:19 pm »
Ian, I've never had a virus on a system in my life.  I've worked on plenty for other folks, but not on mine.  I never run FF and use IE only for streaming drm video, and that's rarely.  Opera doesn't seem to have all the same holes.  I run WinUpdate once in a systems life.  At the begining.  If it works, I don't fix it...

sub,
Thanks for the link to the article. Pretty much what I was expecting.  Ian's last ppg and some of the other posters comments on that article seem to agree with me that all of that can be prevented by decent coding.  In my wildest dreams, I could never figure out how code would be written and allow such things to happen, and be so common.  A mistake by one person, sure, ok.  But for this to happen in virtually all software?  I guess I'm too old for todays 'New programming', (a joke in the US amongst many is the "new math", a way math is done today that arrives at different answers than it used to years ago.  Folks would jokingly refer to 'the new math" when some dumbass arrives at the wrong answer for a simple problem).   

Some of those examples are just silly.  Honestly, in my first weeks of C programming (going way back), I figured out that you don't use a get() for something variable length and put it in a buffer of finite size...  Are we seriously 25 years beyond and programmers of today haven't figured that out yet?  Looking at the comments, it appears I'm not the only one who doesn't feel compassion for these 'programmers'.  I'm not willing to make excuses for them on how this is easily overlooked.  This is first grade stuff.

Well, our discussion of efficiency has long since digressed past the 8 vs 16/32 subject.  Sorry for the thread hijack...  But then, looking at the traffic to this section, it could use a little discussion, even if it is bickering!
EEVBlog: The first forum you need a calculator to post on...
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: Why are you still using 8 bit MCUs?
« Reply #94 on: August 19, 2011, 03:37:58 pm »
Ian, I've never had a virus on a system in my life.  I've worked on plenty for other folks, but not on mine.  I never run FF and use IE only for streaming drm video, and that's rarely.  Opera doesn't seem to have all the same holes.  I run WinUpdate once in a systems life.  At the begining.  If it works, I don't fix it...
Yeah, I used to be where you are. I ran like that for years. Viruses were something that happened to other people. Yet one day, I was just sitting there minding my own business when my computer took on a life of its own. The disk drive started whirring and suddenly my machine was misbehaving.  Every time I would try to visit a page in a web browser (any browser) it would jump to somewhere else. This would especially happen if I tried to visit pages to download antivirus software or security updates.

It took me about 8 hours to clean up this mess and remove the infection. It turned out my machine had been root kitted and the malware had got deep into the system. It took a lot of effort to find the infected files and remove them.

As far as I can tell it was a flash player vulnerability exploited by a malicious flash advert on an ad-supported web site open in the background. Needless to say I am now a bit wiser. Viruses are no longer things that happen to foolish people who download random crap off the Internet. I am much more thorough today about keeping all my software up to date with security patches.

Recently I watched a demo of what could happen to a Windows XP machine that was not up to date with the patches. From another machine on the network, the presenter was able to run a simple command "probe that Windows machine and fine a way in". Within about 5 seconds the program came back with "OK, we are in, you are now running as administrator on that machine". Next step was "get password hashes". Not much use in encrypted passwords, you might think? Well, "get plain text passwords from hashes" with a bit of help from Google soon revealed the administrator password for that machine.

This is so easy to do that if you plug an unpatched Windows XP machine into the open Internet without a firewall to protect it you can watch it get taken over in front of your very eyes. Usually the machine will be compromised faster than you can download and install the necessary Windows updates.
 

alm

  • Guest
Re: Why are you still using 8 bit MCUs?
« Reply #95 on: August 19, 2011, 05:48:58 pm »
In my wildest dreams, I could never figure out how code would be written and allow such things to happen, and be so common.
Part of it is due to some great design decisions in the C language. For example, if you use strncpy to avoid a buffer overflow, n bytes will be copied, but the string will not be null-terminated if the source string is longer than n. If you do the same with strncat, n bytes you specify will be copied, plus an additional null, so n+1 bytes in total. If you use snprintf, n-1 bytes will be written, plus a null, for a total of n bytes. There are also more subtle issues, like an unsigned integer being cast to signed (or visa versa). If the unsigned integer has the most significant bit set, a cast to signed will transform it to a negative integer. A negative integer is smaller than your limit, but the next function may take an unsigned integer and treat it as a really big number.

Writing secure software is just plain hard. Try to find an OS with significant popularity and features that's never had any security issues. Even the OpenBSD people, for whom security is the number one priority, have let through two remote root holes, and a lot more minor security issues.

I guess I'm too old for todays 'New programming', (a joke in the US amongst many is the "new math", a way math is done today that arrives at different answers than it used to years ago.
Old software is by far the worst offender. Only after the Morris worm somewhere in the eighties did anyone start paying some attention to security, and it took much longer for some companies (the small one in Redmond for example) to notice. Before networking became common, it just didn't matter if your word processor might screw up if you fed it incorrect data, since it would be hard to get the manipulated document on someone's computer.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Why are you still using 8 bit MCUs?
« Reply #96 on: August 19, 2011, 06:03:33 pm »
I've never had a virus either and I don't bother with memory resident anti-virus software because I find it too much of a recourse hog. I do keep my system fairly up to date though, run as a limited account for general usage and scan with Malwarebytes every now and then. I accept that there's a risk of my system getting owned but I feel I take far greater risks every day so it's not a priority for me.

So what my system gets owned, what's the worst that could happen? They get hold of my bank account details and buy loads of random crap off ebay. I soon find out, my card gets stopped, the bank cancel all of the transactions and I'm very likely to get my money back. I don't have anything I'm really bothered about loosing on my hard drive and will back up anything I really care about.

I don't understand why people bother spending hours cleaning up viruses. It's much easier to boot with a live Linux CD, back up all the important files to a USB stick or hard drive, format the hard drive, reinstall Windows and remove any virus from the backed up data before transferring it back.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: Why are you still using 8 bit MCUs?
« Reply #97 on: August 19, 2011, 06:17:48 pm »
I don't understand why people bother spending hours cleaning up viruses. It's much easier to boot with a live Linux CD, back up all the important files to a USB stick or hard drive, format the hard drive, reinstall Windows and remove any virus from the backed up data before transferring it back.
You miss one important point. It is not so much the data files, but reinstalling all the programs and utilities that you had installed previously. Do you have the installers for every one of those? Do you remember all the configuration settings you made? Following a clean OS restore, how long would it take you to reinstall every program you had installed before and restore all the system customizations back to the way they were?
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: Why are you still using 8 bit MCUs?
« Reply #98 on: August 19, 2011, 06:48:03 pm »
You miss one important point...how long would it take you to reinstall every program you had installed before and restore all the system customizations back to the way they were?
so i KISS. programs that i've been using are pretty much established for years now, and only a couple, even if its old, i hate changes, i dont like to go find a latest software to try out like i was, more risk of downloading viruses that way, and less productive to keep trying instead of using the "real" softwares for me. so i've made backup from a fresh installation my common programs, so next time a virus hit, i just de-ghost that image, and restart to build up the setting again while using it. i've made many times of those reformat and reinstall and yes i got sick of it, i got sick of viruses. took me days to track the virus, but took me only a day to reformat the whole thing. i hate virus makers, they are losers and pathetic morons, the bad "offsprings" from good "hackers". i know my XP got outdated and highly probably got many holes, i only rely on my automatic updating avast antivirus, but if its still cannot the job then what the heck? even the new OS got holes, it will be always like that from stone age. once there is a new OS, there will be morons that got nothing else to do to find the holes, and they will succeded. they succeded in the past and they always succeded in the future. you can keep updating all you like, but the holes will be always there. i dont want to waste my time on this, i want to do the real job. to all virus/exploit makers, FUCK to all of you! and you know what? devcon is where all its started imho. i dont say everybody presented in there is bad people, but as i said, the "offsprings" are from there mostly, + other geeks (morons) who got nothing else to do in their cave other than stealing, criminal and antisocial! F**K! EOR! i'm just wasting my time here! >:(
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline BBQdChips

  • Contributor
  • Posts: 38
  • Country: us
  • Is that smell coming from my board :?
Re: Why are you still using 8 bit MCUs?
« Reply #99 on: August 19, 2011, 08:17:23 pm »
Hero,
My system sounds a lot like yours.  No extra crap running.  My firewall is a router, not some MS bs in software.  Works for me.

You miss one important point. It is not so much the data files, but reinstalling all the programs and utilities that you had installed previously. Do you have the installers for every one of those? Do you remember all the configuration settings you made? Following a clean OS restore, how long would it take you to reinstall every program you had installed before and restore all the system customizations back to the way they were?
Ian, I reinstall due to new systems, hardware changes, or moving HD's around.  On my home theater PC, now that I do run Open source players on, MPC-HC, and all associated utilities, and software for MKV so I don't have to get out DVDs.  That stuff is a convoluted mess, but I need it.  Reconfig of a system with all that stuff on it to playback blu-ray mkv is a colossal pain in the ass.  Since the DOS days, I've kept a folder call Zips on any system I own (or built and sold when I did that) with 100% of all latest drivers on the system, all shareware / downloaded software I used, or whatever.  All my utilities for everything.  All stored in one nice neat location ready, should I need to move to a new system or reinstall.  My own software, I have ripped to ISO and mount with things like Alcohol or VirtualCloneDrive. I've done that for years and years.  If I load something on a system, it gets put either on that very system, or on an external drive just for this purpose.  So yes, I do keep all that stuff and I'm very methodical about it.  But as you say, it is still a huge pain to set the systems back up to where they were.

Using Opera for Internet and Mail is a huge help in that respect.  It stores data the old fashioned way, in files.  So you can just copy the folder to a backup location, and after you reinstall it, copy that folder back and 100% of your browser is back.  Even cross platform.  Copy the Linux files to the Win pc, still works.  Some are in different locations, and some do have slightly different formats, but for the stuff we actually use like Bookmarks, mail folders and accounts, passwords, all that stuff works regardless of the platform.  I also use their "cloud" like thing which really makes it simple.  Log in and pow, everything is back.  (configurable as to what you let them save).

Still, as you say, it's an all day affair to do a fresh load on a new system drive, so I prefer to do it as seldom as I can.

To get back on the subject of 8bit microcontrollers, I was today on the Atmel site looking at Tiny's and Microchip site looking at Pic16's for a new project.  I see prices have come down again on the 8 bit parts.  I can get everything I need for this project in a 28pin QFN for less than $1.50/unit qty 1.  Incredible, this on a chip that internally has more power than the first IBM PC I worked on which cost almost $20,000 back in 1984.  Back then a 10MB hard drive came in its own cabinet just like the PC cabinet, but with no front openings.  You stacked em up!  Of course, that system had a 8087 chip in it too, and that was no small-potatoes update!

Just for giggles, I looked for a comparable 32bit chip to see about this minimal difference in cost that's been advocated.  Sorry, but I do not see any 32bit parts for <$1.50/unit.  Even at volume pricing.
EEVBlog: The first forum you need a calculator to post on...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf