bmcculla said:The AVR isn't a simple copy of the PIC its a completely new archetecture designed to be a RISC processor. The PIC just happens to have a very small instruction set - its not a true RISC processor.
bmcculla said:This is one of the arguments for CISC. For example the 8051(CISC processor) has instructions to set or clear a single bit in memory which is very useful for control applications. On a risk processor you would have to read the Byte from memory change the correct bit and then load it back into memory - 3 instructions.
samcheetah said:i mean does speed only depend on the instruction cycle. as i told u guys that i have been connected to the computer hardware industry for quite a long time. i have learnt from there that speed is not everything. its the architecture that has to be efficient. like AMD chips with lower clock frequencies compete with Intel chips working at higher clock frequencies. its because both of them have different architectures. so its not how fast a microprocessor works, its how efficiently it works!!!!! what are the advantages and disadvantages of the PIC and AVR architectures??
whats the difference between a register to register architecture and an accumulator architecture. i have learnt that all microcontrollers use accumulator registers to store the results of operations e.g if we add A to B, the result C will be stored in an accumulator. so what is a register to register architecture.
why is that so. actually im new to assembly. is it difficult to write programs for microcontrollers that use the accumulator architecture? what benefits does register to register architecture provide in writing programs using assembly.
Noggin said:I believe the PIC does not have general purpose registers available and everything must be stored in memory locations, but note I am NOT familiar with the PIC so I could be mistaken!!!
Assume you have X stored in memory location [A]
Assume you have Y stored in memory location
Assume you want Z stored in memory location [C] and to be X + Y
load MEM(A) --- moves data in location A to the accumulator
add MEM(B) --- adds the data in location B to the accumulator
store MEM(C) --- stores the data in the accumulator to location C
Are there any PICs that can compare to the higher end AVRs
128 kB flash
4 kB sram
4 kB EEPROM
2 USARTs
1 SPI
8 Channel 10 bit ADC
JTAG interface
2 16-bit timers
2 8-bit timers
1 two wire serial interface
1 analog comparator
8 external interrupts
self-programmable
watchdog timer
internal oscillator up to 8 MHz
53 IO pins
can operate at 2.7v (for 8MHz chips)
One is uniform registers - all the registers are the same with no (or few) special purpose registers
AVRs are faster(by 4 times). Which is useful but not critical, like Nigel said. It lets you ruduce the operating frequency which reduces EMI and power consumption.
As you are probably aware, the PIC has commands to directly set or clear a single bit, and to test a single bit - it's one of it's big advantages compared with most CISC processors
As someone pointed out one of the great things about a PIC is that you can set, test, or clear a bit in a single instructions (4 cycles) regardless of what the rest of the byte is. In an AVR you must read, set/test/clear, and then write. This takes 3 instructions (3 cycles) except for the test since you don't have to rewrite it.
The PIC insn't really a RISC processor thats why it has the instructions to set a single bit. The PIC really has a Reduced set of Complex instructions - not a true RISC processor. Theres nothing wrong with this - as Nigel pointed out it is actualy a benifit (one of the reasons CISC is good - each instruction can do more than the equivalent RISC instruction).
EMI is an issue even at lower frequencies. The clock desnt just generate the primary frequency; because its a square wave it also has higher multiples of that frequency which can cause interfreance
samcheetah said:thanx for pointing that out. i read that somewhere a few days ago that the harmonic frequencies of a square wave have higher multiples of the fundamental frequency. so this means that every microprocessor is prone to having problem with EMI and PIC isnt just the only one. even AVRs would have this problem. but which one stands out better in eliminating EMI? i think it is the AVR. am i right??
I think power consumption is an issue.
Power consumption doesn't matter in DIY project. However, it is important in commercial product. It is annoying that you have to keep changing battery often
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?