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.

Which Assembly language programming is better for a beginner, PIC or ATMEL?

Status
Not open for further replies.

sidy50

Member level 4
Joined
Dec 31, 2009
Messages
79
Helped
14
Reputation
28
Reaction score
3
Trophy points
1,288
Location
India
Activity points
1,839
HI all,

m newbie with microncontrollers...although i kno some basic assembly programming about pic and At89s51 and have tried them on Tina simulator...
i also have a JDM programmer for PIC and USBasp for programming AVR...
However ill manage to make 1 more USBasp programmer for programming both AVR and AT89Sxx series...and m willing to do some programming based on AT89Sxx series

PLS suggest me which microcontroller should i start with for Assembly language programming ATMEL or PIC as a beginner...:?:

Thanx
sidy
 

PIC or ATMEL

Hi,
It all depends on your choice. By ATMEL, if you mean 89Sxx series, I'd say go for PIC. But if you mean AVR, my advice would be to go for AVR.
It all depends on your choice, as whatever PIC can do, AVR can do and vice-versa.
Only, I find AVRs are cheaper than PICs.
After using both, now I'm using AVRs(ATmega and ATtiny, that's what I use), because of these reasons:
1) Cheaper than equivalent PICs.
2) Speedier(20MIPS max) compared to a max of 12MIPS for PIC18 and 5MIPS for PIC16 and 8MIPS for the newest PIC16s.
3) I found learning AVRs much easier than learning PICs. I feel there is less hassle in AVRs than is in PICs.
Anyway, both are very good chips. It all depends on you.
My choice:
PIC vs 89Sxx ------> PIC
PIC vs AVR --------> AVR
This is only for 8-bit PICs. If you choose 16-bit, it's PIC hands down. But as a beginner you're obviously gonna go 8-bit.
Hope it helped.
Tahmid.
PS I just expressed my opinions. There are probably hundreds out there who'd agree with me and as much who would disagree.
 

Re: PIC or ATMEL

Thanx Tahmid for ur descriptive reply...

i was thinking to start with AT89Sxx..coz i have heard after learning it, its easier to learn AVR...if i continued with PIC then later on ill have to switch to AVR, coz they have many better features as compared to PIc and also they are cheap as u said..

can u pls mention a good assembly language tutorial for AVR...
 

PIC or ATMEL

Hi,
Yeah, I heard so as well.
I wouldn't know about assembly, as I use mikroBASIC. You could use it as well. Or you could also use mikroC or mikroPASCAL.
As for assembly, Google returned these, which I think could help you:
www.atmel.com/atmel/acrobat/doc1022.pdf
www.atmel.com/dyn/resources/prod_documents/novice.pdf
www.atmel.com/dyn/resources/prod_documents/novice.pdf
www.ic.unicamp.br/~ducatte/mc404/Atmel/AVR_Studio/beginner_en.pdf
**broken link removed**
**broken link removed**
http://www.avr-asm-tutorial.net/avr_en/beginner/
http://www.avrtutor.com/tutorial/thermo/welcome.php
http://www.avr-asm-tutorial.net/avr_en/
 

    sidy50

    Points: 2
    Helpful Answer Positive Rating
Re: PIC or ATMEL

sidy50 said:
if i continued with PIC then later on ill have to switch to AVR, coz they have many better features as compared to PIc and also they are cheap as u said..

I don't think so.
As I explained in many posts, currently microchip is the no.1 8bit MC manufacturing company. And don't bother about PICs features, It is even more advanced than AVR.

Just search PIC18(8bit) with google, then PIC24(16bit), then dsPIC30(16bit), then dsPIC33(16bit), then PIC32(32bit).
U can't compare AVR with dsPIC33 and PIC32 , because they are very very advanced.

Choice is urs.
 

Re: PIC or ATMEL

You also have to consider the available support tools for the Micro family you intend to use.
I cant talk about AVR but Pic is well supported with free Mplab IDE and Simulator and a lot of compilers for a variety of programming languages.
Also a lot of free or cheap programmers and debuggers.
You can only use the chips if you have the supporting develoment tools.
 

Re: PIC or ATMEL

anandpv2009 wrote

U can't compare AVR with dsPIC33 and PIC32 , because they are very very advanced.

AVR is a 8bit controller, you cant compare it with 16 or 32 bit controllers. Atmel also have a product range of 32 bit micros and arm based controllers.

Each micro has its own advantages and disadvantages. If you are student or hobbist you can go for any controller without bothering about the cost, whenever it comes to commercial product the cost of the controller has a big impact. I found AVR's are cheaper than PIC's most of the time.

Nandhu
 

Re: PIC or ATMEL

OK, my 2 cents to this question. Why bother with either one? Why not going straight for an ARM, there is very little cost difference, actually a Cortex-M0 based device may be cheaper than an AVR or C51 with the same amount of memory.
**broken link removed**

Tools for ARM are as versatile as it gets, you can pick from several free options.
If you are really between 89C51 and some PICxx, it is a catch 22. Both have their merits, both have their challenges. I do not like the PIC ASM, really prefer the ASM for 51 but as soon as you go high level language, that does not matter any more. As for AVR or PIC, that depends which PIC family. I agree that the AVR will often provide higher performance than PIC 8-bit, on the other hand, there is a broader offering of devices for PIC. Both are sole source architectures, a reason for me to avoid them. I would go for a multi source architecture, such as the 51 or even better the ARM.

Which ever one you pic(k), have fun with MCUs.


Bob
**broken link removed**[/url]
 

Re: PIC or ATMEL

bobsanjose said:
OK, my 2 cents to this question. Why bother with either one? Why not going straight for an ARM, there is very little cost difference, actually a Cortex-M0 based device may be cheaper than an AVR or C51 with the same amount of memory.

Yes he is right.
But unfortunately ARM controllers are not available in our market. Currently I am using NXPs arm which I bought frm net. The main reason that I prefer PIC is that they are easy to get.

Now I am going to try PIC32 in my ARM based projects, they are available here.
 

PIC or ATMEL

Hi,
the PIC32 can easily compete performance wise with a Cortex-M3 running at similar clock rates. So far the selection of available peripheral / memory / package options is limited but Microchip has a track record of providing a wide selection of devices and it is only a matter of time for the PIC32 family to become a competitor in all aspects.
Bob
 

Re: PIC or ATMEL

bob is right.

What do u think abt this.??
MBedder:-

Most ARM7 core based controllers require over 80(!) machine cycles to toggle a single pin, whereas a dsPIC makes it in a single machine cycle. In 16-bit DSP applications a 60 MHz ARM is 5..10 times slower than a 40 MHz dsPIC, in register based 32-bit math operations ARM7 is 2..4 times faster than dsPIC, in 16-bit generic math they are almost equal. The 80 MHz PIC32 outperforms all ARM7 and most ARM9 core based controllers at least twice in math operations and 10..20 times in i/o and bit handling operations.

Conclusion: do not trust the ARM ad title figures (32 bits, 72 MHz etc.) - as a microcontroller it is between bad and very bad. PIC32 and dsPIC/PIC24 in 99% cases are better than ARM in all aspects.

The comparative figures above were obtained with pure assembler routines to avoid comparing compilers instead of

Source:
https://www.microchip.com/forums/tm.aspx?m=382117
 

PIC or ATMEL

Hi,
There's no doubt that Microchip is going to improve on the PIC32 which will be one hell of a competitor against the very popular ARM.
I believe most general-purpose jobs can be quite easily achieved with 8-bit microcontrollers, either PIC or AVR or any other. There's no need for 32bit controllers for such simple tasks.
dsPIC and PIC24, esp the HJ series are just awesome.
I also heard about the ATxmega from ATMEL and their AVR32. Must be good.
Anyway, all this is quite pointless as you're better off choosing the microcontroller that is suitable for you and that suits your application.
Like, PIC (8-bit ones) can do anything AVR can and vice-versa. PIC32, ARM and AVR32, I guess, the same case.
And I heard Microchip is working on enabling the running of embedded Linux on PIC32. AVR32 and ARM can already do this.
Tahmid.
 

Re: PIC or ATMEL

Tahmid said:
Hi,
And I heard Microchip is working on enabling the running of embedded Linux on PIC32. AVR32 and ARM can already do this.
Tahmid.

May be. But current PIC32 controllers are not capable to runn Linux due to their memory limitaions + They doesn't have MMU to add memory.
Except some tiny OS
**broken link removed**
 

PIC or ATMEL

Yeah, but Microchip said they successfully started Linux on the controller, now they just need to improve on that to provide full functionality.
 

Re: PIC or ATMEL

What do u think abt this.??
MBedder:-

Most ARM7 core based controllers require over 80(!) machine cycles to toggle a single pin, whereas a dsPIC makes it in a single machine cycle. In 16-bit DSP applications a 60 MHz ARM is 5..10 times slower than a 40 MHz dsPIC, in register based 32-bit math operations ARM7 is 2..4 times faster than dsPIC, in 16-bit generic math they are almost equal. The 80 MHz PIC32 outperforms all ARM7 and most ARM9 core based controllers at least twice in math operations and 10..20 times in i/o and bit handling operations.

Conclusion: do not trust the ARM ad title figures (32 bits, 72 MHz etc.) - as a microcontroller it is between bad and very bad. PIC32 and dsPIC/PIC24 in 99% cases are better than ARM in all aspects.

The comparative figures above were obtained with pure assembler routines to avoid comparing compilers instead of

Source:
http://www.microchip.com/forums/tm.aspx?m=382117[/quote]

This quote from Mbedder contains lots of incorrect information (I assume it was not you writing these biased and down right wrong statements). Most newer ARM MCUs can toggle a pin in 2 cycles, presuming that the latest Cortex-M3 run at 120 MHz, that would outperform the fastest dsPIC. I do not know how fast the PIC32 can toggle pins. In all honesty, use a CPLD if you need reliable toggle rates in the tens of MHz range. This is no measure for performance of a microcontroller.
PIC32 is using the MIPS core, definitely not created to work as an embedded microcontroller. There have been some modifications to improve it for this application as MCU but still.. Same holds true for the ARM7 and ARM9, not intended to be a microcontroller core at the beginning of their existence. Totally different for Cortex-M3, engineered to fix the shortcomings of the ARM7 architectures in the microcontroller world.
Don't get me wrong, I consider the PIC32 a real worthy competitor but so is the Cortex-M3 or even the ARM7 in many cases.
In my previous job, we benchmarked the PIC32, an ARM7 running at 72 MHz and a Cortex-M3 running @ 72 MHz for a wider range of applications, including graphics and math. It turned out, that memory subsystems were just as important as CPU throughput. All 3 devices were within 25% margin from fastest to slowest.
We did not test pin toggle though :)

Bob
**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top