LED flasher

donpetru

Joined Nov 14, 2008
185
More instructions means many operations can only be done on certain registers. For example, in the PDF file below you'll see all the instructions used by Atmel MCUs:
http://www.atmel.com/images/doc0856.pdf
Some applications need versatility and more instructions. Someone said, a great user of PIC microcontrollers, it can happen in an application to use all sorts of tricks to achieve a result, a result that can be achieved with a set of specific instructions Atmel AVR.
For this reason (eg fewer instructions) those from Microchip to offset this disadvantage, the clock PIC at a higher frequency than MCU Atmel AVR.

And one major drawback, most microcontroller PIC needs, besides those 5V, of another higher voltage (typically 12 ... 13V) that you can program them but are PIC that support low voltage programming. That's what I forgot to say in the message above, but worth noted here.
For programming AVR microcontrollers only need 5V.

Below I have posted a URL with a very cheap USB Atmel microcontroller programmer:
http://www.ebay.com/itm/New-USB-51-...849?pt=LH_DefaultDomain_0&hash=item3ccb7ad641
 
Last edited:

bance

Joined Aug 11, 2012
315
And one major drawback, microcontroller PIC needs, besides those 5V, of another higher voltage (typically 12 ... 13V) that you can program them. That's what I forgot to say in the message above, but worth noted here.
This is not correct, many newer pics have low voltage programming!;)
 

Potato Pudding

Joined Jun 11, 2010
688
For the simple jobs like flashing some LED's I tend to think of PIC's first, but then you want to do something like use PWM to dim those LED's. I would struggle to explain things like setting up the CCP module. I still find myself searching for resources.

More peripherals in a low cost MCU can make up for a lot of disadvantages. If you multiply that cost by 1000, or 1000000 chips then that is a great business incentive to make PICs work.

So many of the PIC peripherals can be used to simplify the code and keep functions from using processor clocks. That makes up for a lot of the performance gains that you point at as being in the AVR chips favor. Part of this is I think a conscious design philosophy because they are trying to sidestep the legacy of their longer history.

DonPetru, I admit that I suspected some of what you laid out but not all of it and it makes a difference to see it all laid out that way. The main difference is that PIC has a longer history going back to when it was all a bit more crude and resources were more expensive with basic developments still in progress instead of ready on the shelf. That legacy shows. AVR is a newer company that has the incentive to look at a competitor like Microchip and ask how they can improve on that. Resources are cheaper now, more standards are in place - well revised for stability. Working from an established standard instead of towards a standard in development makes a difference.

Mostly I want to thank you for sharing your comparison.
 

Thread Starter

lotusmoon

Joined Jun 14, 2013
227
Hi There
I have had a bit of trouble setting up my pickit 2. and now do not have time to put my mind on it until next week. But if anyone can give me a link to some schematics on what the lay out would be for and LED custer with different wavelength options I would be interested to see how this works.
 

bance

Joined Aug 11, 2012
315
You haven't really said enough about what you want to do for anyone to throw up a schematic.

Anyway you should try to do your own, it doesn't matter if you get it wrong, everybody, and I mean everybody makes mistakes the first time they draw up a schematic. If not mistakes then at least revisions. There's plenty of free or free to use software out there, or you can use an on-line app.

It's a skill you'll need in the future so you may as well bite the bullet!:D


HTH Steve.

Ohh and download the datasheet for your chosen PIC and at least print out the instruction set summary for yourself, maybe even laminate it, you'll be referring to it often.
 
Last edited:

bance

Joined Aug 11, 2012
315
I don't know what problems you're having with the software from micro-chip. but the first tutorial from gooligum covers downloading and setting up your dev board or one like it. I'm sure you'll be able to work it out, else just ask here, someone will help....

Steve
 

Thread Starter

lotusmoon

Joined Jun 14, 2013
227
i think it is the MPLAB IDE as the pickit lights up and starts. I think i just need to spend time learning how it all works and I think i need something else to go with the MPLAB IDE. next week I will have time to look at it all. at the minute I am to busy to have the time, I will make a post then. thank you for all your help
 

Potato Pudding

Joined Jun 11, 2010
688
You have the PICKit2 with the 44-Pin demo board?

For starters, try using the PICKit2 application to read the hex file demo code from the 44-Pin board and save it.

You can copy the lesson files from the CD that came with the kit. I believe the paths are for example, a folder called <OpticalDrive>\Install\Lessons\44-Pin Demo Board\01 Hello World.

You can just load the hex files for those using the PICKit 2 App or you can load the ASM files in MPLab IDE.

Read through the PDF document 44-Pin Demo board users guide, and use the code and hex files to get the board working with the different lesson codes as you read through.

Take your time. Details are important, and getting the general idea is only going to leave you frustrated when some crucial piece of information that doesn't seem important is missed and you can't manage to make anything work. Don't get frustrated, just keep looking at the information and ask questions when you need to.

I find that just writing a question down will either suggest the answer or spur me to check my research first and find that the answer is available.
 
Top