Back to Basics: Pullup and Pulldown Resistors

Pullup and Pulldown Resistors

Pullup & Pulldown resistors are used in logic circuits to ensure that a particular pin(or logic gate) is put at a well-defined state ie) at high & low respectively. If it’s not connected in a pullup or pulldown mode, the particular pin can be in a floating state and it can be read as either a high or a low, at any instant of time, in the absence of a signal. Refer to the image on how you would wire up in these modes.

The selection of these resistors is not that tricky for normal operations. The things to consider are the amount of current which can be sourced or sunk from a particular pin. A strong pullup means that the resistor value is small(Means larger current, more power dissipation/wastage) making the “pull” to the supply stronger. Nomenclature is reversed on that one. Strong means lower resistance and a weak pull-up means a larger resistance. The ideal chosen pullup resistance value is the one that takes the minimum current to maintain its high logic state. Usually, most people randomly choose a resistance in the 1k-10k ohm range and it works for most use cases. But ideally, you need to calculate it based on the minimum current required and minimum recognisable logic gate voltage. I will get to that in a future post. This becomes really critical in some use cases like high-speed I2C where the communication bus capacitance also starts playing a role in selection.

If you liked the post, Share it with your friends!

CoreMark: Benchmarking Processors

Developed by a non-profit, Embedded Microprocessor Benchmark Consortium(EEMBC) in 1997 is currently one of the most popular benchmarking software available to characterize and compare the processing capabilities of your embedded microcontrollers. It’s a piece of code that runs on practically any processor/controller out there and does a bunch of tests and reports the result in a standard format. The code conducts a bunch of integer arithmetic calculations, matrix manipulations, linked lists and state machine operations. So it does a few of the performance benchmarks which are used in real life (but it’s still synthetic testing though). CoreMark when it was released, was an alternative to another standard known as Dhrystone that was created back in the 1980s. The issue with Dhrystone was that you can always tweak certain settings to get a higher rating based on compiler optimisations.

CoreMark prevents compiler hacks and smart programming tricks to drive up the ratings. The tests and code are available for free on GitHub if you want to run them on any controller of your choice.

Why does this matter for an embedded developer? When you are searching for a new microcontroller for a project you can always look at the CoreMark numbers and make an informed decision(Usually the higher the better). Most good chip manufacturers give the CoreMark ratings on their products but each might give it in a slightly different manner. There are 3 key numbers you need to keep in mind for that. A single CoreMark number shows the overall performance of the chip. Then there is CoreMark/MHz which normalises the core performance based on the clock speed. A chip having a lower CoreMark/MHz can have an overall better compute capability if it’s run at a higher clock speed. The third is CoreMark/mA which gives you a flavour of energy efficiency/power consumption of your processor. So keep all of these in mind when comparing microcontrollers.

CoreMark scores submitted by users all around can be found at https://www.eembc.org/coremark/scores.php.

If you liked the post, Share it with your friends!
1 89 90 91 92 93 118