Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why is library support for 8051 so meagre ?

Status
Not open for further replies.

vsmGuy

Advanced Member level 2
Joined
Jun 26, 2006
Messages
503
Helped
44
Reputation
88
Reaction score
15
Trophy points
1,298
Location
VddVss
Activity points
3,882
Why is library support for 8051 so meagre ?

On PICs for example

1. One just writes a

Code:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)

to start using the serial port, and better still, the CCS compiler will emulate a serial port in software if a UART does not exist - all transparent to the user.
But here, one has to explicitly set the registers and timer values to get the serial posrt working.

CCS will also warn a user if the serial port speed selected by him will give a very high error rate - none of the 8051 compilers do that.

2. Timers are a major headache here. No support for delays anywhere. In CCS one just writes

Code:
delay_ms(5);

to get a delay for 5ms, but here I have to explicitly setup either software delays or use some free timer to handle this task for me - involving lots of mechanical computations which a compiler/preprocessor can easily handle.

Why is this so ?

At this rate I would be as well off as writing in ASM if I have to handle setting all the peripherals myself.

What do you guys have to say about this ?
 

In my opinion, 8051 are quite well-known uC, you can write the custom code without library.

For delay_ms(), it is hardware specific depending on the value of XTAL so it is no standard library for this.
 

sci-3d said:
In my opinion, 8051 are quite well-known uC, you can write the custom code without library.

Anyone can do that. This defeats the whole point of having a good C compiler. The free SDCC compiles C code to HEX just fine as well.

sci-3d said:
For delay_ms(), it is hardware specific depending on the value of XTAL so it is no standard library for this.

That's not the point. In CCS for PICs, one just has to define the clock freq value. That's all is need to setup the delay.

This is NO reason whatsoever to NOT have a standard library call !
 

Hello all.
Take a look in all libraries provided by Micrchip C18 compiler.
And together with all examples provided and forum discussions you will have a very fast development time and all for free.

I have carefully checked all this before developing my last application/design.

For the first time I gave up the 8051 mess and used a PIC18F.

The development was much faster and easier. I only have gotten advantages, almost the whole code in C, very small machine dependent code, ANSI compatible, cheap processor, etc.... I am now very happy with the result.

I will never more waste my time with 8051.

That was just my personal opinion and experience from the last 3 months hard work. No relation to Microchip, etc...

All the stuff is free (Mplab and C18). Just download it and give it a try, you will not regret.

Hope it helps.
S.
 

This is by no means a thread to brainwash existing 8051 users to PICs.

I just want to know if library support for 8051 is really thta bad or I am the one who does not know about great libraries that exist somewhere....

Let's not deviate from this topic. Glorifying PICs in this thread is my sole right :)
 

Well, you mentioned SDCC... It's open source, you know, which is the synonym of "if you miss it, make it and contribute"... :)

Or you can inspire the authors of said compilers, putting this same rant on the Keil, SDCC, whatever forum or other means of support...

wek

PS. It's a good point anyway
 

Any more inputs ?

It's been 6 months since I first made this post and my opinion has not changed a bit !

I did find a lot of custom libraries, but I left to wonder why expensive compilers like Keil, IAR etc don;t give as good library support !
 

The 8051 is not popular anymore except in India, it's ancient and there's no money in it compared to PIC or Atmel.
 

Yeah, I agree the 8051 and its variants are getting a little dated. Over here in south africa cost is also a factor, a pic18F4550 chip is substantially cheaper than just the equivalent performance 8051 mcu, and that also does not allow for USB.

Cheers
Slayer
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top