Is there a good simulator for 8051/8085 muCs on linux? I checked out sourceforge/freshmeat but was not satisfied with the available projects. Most of the currently available limit the stack size. Also, is there a simulator with C compiler bundled together? I am new to embedded programming and would like to start coding in C (and not assembly).
Can't let that go unchallenged Chris. Most of the Windows based simulators run fine on linux using wine and there very soon will be a very good cross platform 8051 simulator - watch this space. There are several assemblers with a native Linux port and of course the SDCC compiler, all of which are free. Not to mention that there are commercial Linux based IDEs too.
You do realize that the 8051 and 8085 are completely different architectuers? There are several 8080/8085/Z80 simulators for Linux. Most of them were set up to run the CP/M OS.
Twenty years and five employers ago there was an excellent 8051 simulator written in C that ran under v7 on a PDP-11. It simulated all of the standard 8051 peripherals as well as the basic CPU/memory. It was an in-house program we used to test/debug embedded stuff we were writing. I'm sure it would run fine on Linux, but that's a moot point since I don't have a copy.
Huh? The 8051 limits the stack size in hardware, so a simulator had better limit the stack size or it would be much of a simulator.
1) Unless you've got really good reasons to use an 8051 or 8085, you'd be much better off picking a modern processor. If you want to do development under Linux, you're probably best off with something supported by GCC. I'd recommend either the Renesas H8 family or the Atmel AVR.
2) If you want to do embedded stuff, you'll have to learn assembly.
--
Grant Edwards grante Yow! Loni Anderson's hair
at should be LEGALIZED!!
Thanks a lot for the information. I agree with you (and others who replied) about the assembly part. I am currently working with the Keil compiler that came with the book "Embedded C - by Michael J Pont" although its a demo compiler (and thus, limited in a few ways).
Ian: do let me know if you have personally used a windows based 8051 simulator that you used in linux via wine. Also, which distro of linux?
Matthias: I have tried SDCC from sourceforge but unfortunately, did not get anywhere much. I am basically looking for a something that is primarily a simulator; am happy with GCC being the compiler.
Grant: Yes, I do realise the differences b/w 8051 and 8085. It's just that the book I am reading (see above) recommends a newbie start with these archs since they are relatively simpler. I do not have much of a personal opinion on this though. Basically, the books have example code pertinent to 8051. Btw, what is the most commonly used mu-C in embedded industry these days (I was told, its 8051)?
Any specific online reference that you guys found useful in learning assembly from scratch (uptill a good level)? I will just go google anyway..
Yes, the 8051 is still pretty popular. There are a lot of vendors selling a lot of different varieties. The 8051 architectuer is also pretty quirky -- especially if you want to program in C or you need to use external data memory. The 8085 was considered obsolete 25+ years ago when the Z80 came out. Forget about the 8085.
The book must have been written about 20 years ago.
That depends on how you measure it. If it's design wins, it's probably PIC or 8051, though the AVR and various flavors of ARM are coming on pretty strong the past couple years.
If it's units sold, it's probably a Chinese/Taiwanese 4-bitter (or possibly one of the 6501-subset parts) that goes into toys.
--
Grant Edwards grante Yow! Maybe we could paint
at GOLDIE HAWN a rich PRUSSIAN
There is no assembly course in general, it is specific to the architecture of the micro you choose. You will need to learn the assembly language for every core. That's where C is preferable when you can afford it, but others will argue, forget that...
They are all similar, though, from a distance, moving data to and from registers, branching, etc...
That is the best Keil compiler for the 8051. It is limited by size only. As it is rather efficient you will find it is going to be as good as some of the less restricted compilers. Due to it's aggressive data overlaying it can outperform some of the free unrestricted compilers.
You can download a later version than is on the book. The version on the CD is now quite old. I think It was a V6?
You won't get a better sim than the Keil sim. As for GCC you will be better of in some cases with the limited Keil compiler.
Ignore the 8085. The 8051 is old but it is an expanding family (some
600 variants from 40+ silicon companies) Philips and Infineon added new ranges this year.
Yes... still by a LONG way. Also there are plenty of cheap dev kits around for it.
Other choices are PIC and AVR. However these are both single source and in the case of the PIC a bit strange.
You could go to ARM which has a lot of variants, cheap dev kits and many tools. Also it uses JTAG to debug so you can get a complete professional dev system quite cheaply.
C and the 8051 by Thomas Schultz. 3rd Editon Despite the name it does cover assembler. It is based on a Silicon Labs kit that is not expensive and uses a JTAG debugger.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org
I wouldn't assume that. About once a year, I get the urge to try Wine using Windows programs I commonly use, and once a year they all fail in some way. Its a noble project, but it never seems to complete its goals.
The 80C51 is certainly, by far, the most widely sourced. It also tends to lead the 8 bit pack, on analog performance, and models are available at 25/33/50/100 (peak) MIPS see
formatting link
You are making things _much_ harder for yourself in the training dept, by mandating Linux. I'd get a minimal 2nd hand Win2000 PC, and use that as a devel box. You do not need GHz CPUs for Compilers/Emulators. You'll spend all of your time in an editor, or debug Sw, anyway, so you can ignore the windows boot screen..:)
re simulation, I would suggest you sidestep that, and simply get an
80C51 with inbuilt emulation. Best current devices for that are from SiLabs, and their C8051F604DK is the lowest price. (less than a book)
- and I'd also check into the develop kits for their new Si8250 80C51, with 200MHz PWMs, 10MHz loop ADC, & 50 MIPS core.
That way, you test/learn with real silicon, in a real environment...
Winbond, Gencore, Goal, and Atmel also have inbuilt debug 80C51's comming/in release.
I'd get a Compiler that has good Assembler Report output, and scan that for various simple code examples, so you will see how the compiler maps onto the core.
Another usefull training tool, is a disassembler (free on the net),
- feed the final HEX file into it, and you get right down to the iron, and can see all the INT vectors, and startup codes etc, a true 'bottom up' view of your code.
Most debug systems include a window that has this view dis-asm as well.
The 8051 I can understand. It's popular (though not an easy architecture to learn on). The choice of the 8085 baffles me. They were considered obsolete for new projects 20 years ago. They haven't made them for years.
The PIC is another quirky architecture that doesn't have good free or Linux hosted tools. If you want high-quality free, linux-hosted tools, I'd recommend the H8, AVR, or ARM.
My advice: if this is a learning experience, pick one that's cheap and easy to learn rather than the one that's the most popular in industry. After you've got one architecture under your belt, move on to the next one.
AVR and ARM are both quite popular. H8 not quite as much, but it is an easy part to work with. Professional grade tools for all three are free.
--
Grant Edwards grante Yow! I selected E5... but
at I didn't hear "Sam the Sham
I currently have several on my machine which run under wine. O tried many and as expected some work well and others not. The ones I have currently are:
535 Simulator
formatting link
PDS52 Simulator
formatting link
WSIM51 from SPS Sogtware Simulate 2003 from FST Soft Emulator 8051 from TS Controls TopView Simulator JSIM
formatting link
The Linux distro does not really matter but I am using Slackware 10.0
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.