A number of high registers are also available for register local variables. The rest are for global variables that have the most accesses- "state", "mode", etc. These are usually split between 8-bit & 16-bit "scratch" variables for calculations and to hold repetitively-used values.
![si labs timing solutions si labs timing solutions](https://www.labunlimited.co.uk/streamProductImage.aspx?type=PRODUC&width=500&height=500&padimage=1&filetype=JPG&paddingColour=16777215&scale=upscalecanvas&ref=4AJ-9041072&ver=2&x=.jpg)
I use the remainder of the available low registers for register variables. (Right? I haven't done an x51 for a while.) I use several of the low registers (and GPIO in newer models) for CV "bit" variables, so that ends up as a wash with the '51.
#Si labs timing solutions code#
(The next part would depend on your compiler and it's code generation model.) I've found that to make my true microcontroller apps faster (up to 25%) and smaller (up to 20%) is to have global register variables and use the heck out of them. But you don't necessarily >have<< that in a complete program. Repeated sequences of that would obviously tip in the favor of the '51. So on your '51 that might be ~6 clocks (? Does it depend on the variant?) so that would be 250ns 24MHz. Yes, the 5-AVR-clock LDS/ANDI/STS isn't the best.
![si labs timing solutions si labs timing solutions](https://audioxpress.com/assets/upload/images/1/20170421103252_SiliconLabsUSBI2SWeb.jpg)
What I'm trying to suggest is that both arrangements have strengths and weaknesses, and one cannot arbitrarily say that one architecture will always offer better performance than the other. You can use any of the AVR's 32 GPRs for most basic arithmetic without needing to shuffle things around. Having to swap things in and out of the Accumulator in order to do arithmetic can get time-consuming though. If used correctly, this may be a blessing or a curse compared with the AVR's I/O instructions.)įrom 129 up to 256 bytes, then you start getting into having to either use the indirect addressing modes, which further add to the latency because you need to set-up (and possibly preserve/restore the former value of) whichever GPR you choose to use as the index register.įor greater than 256 bytes, you need to transfer data down from the high memory sections down to a location which is accessible by one of the lower addressing modes.īy this time, you start getting into similar timing conditions as what you can expect from an AVR. (Direct mode can also access the 128 SFRs. They tyipcally require 2 or 3 clock cycles, depending on the nature of the operand if applicable. If you can restrict yourself to 128 bytes of data, you can take advantage of the direct addressing modes, which the AVR cannot match.
![si labs timing solutions si labs timing solutions](https://www.allaboutcircuits.com/uploads/articles/Simplified_block_diagram_for_a_single_Si827x_channel.jpg)
If you can restrict yourself to 8 bytes of data, you can use a single bank of GPRs, which offer essentially the same timing as you could get with an AVR, except immediate operands typically eat up 2 clocks instead of 1.įrom 9 to 32 bytes of data, you need to swap around which of the four banks of GPRs you want to work with. ) can be done in direkt SRAM on the 8051, but on the AVR not. ĭanni wrote: Most instructions (INC, DEC, XRL, DJNZ. That is a great help when working on EMI issues compared to starting with the much faster crystal as on a typical '51 or PIC design. I suspect it is about a toss-up with the few-clockers.Ī side issue on that, and the OP: If our AVR design starts with a 3.6864MHz crystal, that is the fastest clock running around on the board. I'll make a counter statement: "AVR programs are mostly faster because of the 32 GP registers."įor speed, a moderately-clocked AVR runs rings around a classic '51 in the cross-platform benchmarks that I have seen. As Kartman said, one can't necessarily dismiss either choice.īut I certainly cannot agree that your conclusion in the second part of your statement can be drawn from the first part.
![si labs timing solutions si labs timing solutions](https://cdn.everythingrf.com/live/Silicon_Labs_Infographic_200.jpg)
And some of the new '51 variants have real cool peripheral subsets, and the single-clockers and few-clockers are real fast. Now I have the greatest respect for your work, danni. Please just provide your opinion for me and I will really appreciate it~ Price: Mega88=0.85/pc with FW loading(free support), Silabs 1.3/pc => Mega88 Built-in Temperature sensor: mega88 non, Silabs has => Silabs, Atmel Mega88 will has built-in solution in Q2/07’.Ħ. DAC: Mega88 None, Silabs 12 bit => Silabs, Atmel said Mega88 could use PWM + brief circuit = DAC outputĥ. ADC: Mega88 10bit, Sillabs 12bit, => Silabs, but Atmel Mega88 could perform real 10bit resolution and Silabs unknown.Ĥ. EEPROM size: Mega88 512bytes, Silabs (0, and need external EEPROM) => Mega88, is there any layout space issue?ģ. (need to check with Atmel AVR & Silabs CIP-51 assembly code performance, traditional 8051 assembly code is around 1/2~1/3 speed of AVR )Ģ. Speed: Atmel Mega88 8MHz, Silabs(24.5MHz) => Silabs is faster? Here bellow I list the requirement for our project.ġ. My colleague just told me Silabs C8051F413 is 24.5MHz much higher than Mega88 8MHz. I have a dilemma to choose one of it into my project.