# Tag Info

0

Some modern RISC processors have dedicated integer multiplication (or multiply-add or MAC) circuit blocks, some very small or low power ones don’t (some of the earliest RISC ISAs didn’t even have a MUL instruction). The multiply logic blocks are often just a bunch of layers of (3 input, 2 output) carry-save adders (mostly XOR gates), sometimes stacked, ...

0

There are ALU multiplication units : Source of image The very basic MCU, CPU has the ALU with multiplication/division capabilities. However you can build an ALU without it, but it can be still called an ALU. The very first computers didn't had an ALU with such capabilities, therefore the mul/div was made with a program that was shifting and adding. Such ALU ...

0

Some faster and larger processors have hardware multiplier and some slower and smaller don't. Division can be also made faster with hardware. If there is no hardware to help, the software needs to perform multiplication and division with a software algorithm. While successive addition and subtraction can do it, there are faster ways to do it, for example ...

1

Yes, it is called a ALU, or Arithmetic Logic Unit. It does the integer, floating point and binary/boolean operations all in hardware, with things like square-roots needing extra CPU cycles. Now days extra help from vector processors on another card or as part of a video card (CUDA cores) or GPU can process huge arrays of numbers. Todays 64 bit operating ...

0

I'm wondering why a 20mA current draw would drain 3800mA battery in 2 days. Simple mathematics indicate a good week of standby time with the module always on. It's very likely that the battery itself is cheap/beated, being not able to provide the capacity it's rated for. Or, maybe the pump draws too much power. Calculate the consumption of the motor by it's ...

3

It's in the datasheet - https://www.ti.com/lit/ds/symlink/uln2003a.pdf?ts=1596498695539&ref_url=https%253A%252F%252Fwww.google.com%252F 8.4.1 Inductive Load Drive When the COM pin is tied to the coil supply voltage, ULN2003A device is able to drive inductive loads and suppress the kick-back voltage through the internal free-wheeling diodes. 8.4.2 ...

0

Your system is not well designed. The fan is not just a cooler but a heat transfer device, so keep that at a constant speed independent of the heat control but only at a minimal speed sufficient to raise the temperature slightly faster than it cools down from ambient insulation. The heat control driver is the big EMI problem that interference with by ...

2

We finally found the problem: At some point, we accidentally overwrote the trim registers. We got extra ACSs (but 30A version this time) and it is working reasonably well. Thank you! As for the code: We're using TI's MSP432 as MCU, and we're using TI DriverLib to get the I2C working. As for the "decoding" code, here it is: float ...

0

Generally, this is handled in software. As with the Arduino and RPi expansion, you connect the peripherals you need to the available I/O and then configure your software to suit. Some part of me would like to encourage a Plug-n-Play architecture for the low-level embedded world, but that effort was famously messy in general computing. USB is great most of ...

2

Ok, I've done some testing and i've found out that as stated in the cover of the datasheet the power supply of your ASEK71020KMAB-090B3-I2C and your Micro-controller unit needs to be isolated. You should be able to test this out by powering it all from a laptop using only it's battery (it shouldn't be charging otherwise it wont be isolated). This fixed my ...

2

The ATMega32 will not run from a 16MHz external crystal by default. If you have not programmed its fuse bits for a 16MHz external clock (or the fuse bits are otherwise set to their factory defaults), then the ATMega32 will not use the external crystal and it will not be running at 16MHz. Don't be intimidated by the name 'fuse bit', the 'fuse' part is not ...

3

The remainder will alwas be the same, but if it is always zero or something elsr depends on the exact CRC algorithm, namely the "final xor". If you have to write for example written 10 bytes of data and have calculated 2 bytes of CRC from that data, you write 12 bytes to the memory. When you read if back, you read all 12 bytes, calculate the CRC ...

0

If you just want to test it, use a multimeter. The stepper has 2 or 3 coils. Check continuity testing wires by pairs. If the coils are OK, probably the motor is working.

5

You do not need R2. If you want to include R3, traditionally it is on the other side of the switch, so both the switch and the capacitor are connected directly to GND. Yes, it's a series circuit and it doesn't matter, but that is the way most designers think. R1 - 100K R3 - 1K (optional) The only reason for R3 is to limit the peak current through the ...

3

This is not a microcontroller thing. Processors do this, various other products do this. On one side of it why waste the money on a high priced oscillator when you dont have to. Another side as mentioned is this gives you flexibility. What mcus have come to develop is an internal RC oscillator, add to that the PLL and you gain even more flexibility at a ...

0

All you need is a capacitor and a pullup resistor. All debouncing can be done in software. I don't know how you are sensing the input but a simple way is to read it every 10 to 50ms. If it reads high twice in a row that is a button press. If it reads low twice in a row, the button has been released. If it is still bouncing, change it to three times in a row. ...

6

You are correct about R3. However, R2 is not necessary: when the button is released, the capacitor will charge slowly due to the resistance of R1. When the button is pressed, it will discharge slowly due to the resistance of R3. In fact, R2 can even cause a problem: with the button pressed, the capacitor voltage will not reach ground (since R2 and R1 will ...

5

To add to the other answers, there are couple of other reasons why a PLL may be useful: To reduce EMC emissions (while also saving money, and reducing the chance of glitches) To quote from ST application note AN1709: Some microcontrollers have an embedded programmable PLL Clock Generator allowing the usage of standard 3 to 25 MHz crystals to obtain a large ...

3

A PLL allows to multiply the frequency to a higher level than achievable with other means. For instance, if there is a need to run a STM32 MCU at 400 MHz, there is no way to connect a 400 MHz crystal or square wave oscillator directly to a MCU. A 4 MHz crystal can be used, and the PLL inside the MCU can be set to multiply the reference 4MHz by 100 to achieve ...

2

A uC has access to many configurable registers and counters which are useful for synthesizing a wide range of frequencies for many purposes. A frequency mixer compares 2 clocks through a low pass filter to control a VCO which is used to derive one of the clocks. The other is from an internal RC oscillator or external very stable resonator with high Q. It may ...

38

The PLL lets you be flexible with clock speed even after you've built the board, and of course, it lets you generate many different frequencies from the one onboard oscillator. Honestly, just having a PLL so you can generate many frequencies off the onboard RC oscillator makes it worth having a PLL. That way you can operate flexibly with no external ...

7

I don't understand how PLL relates to microcontroller. I'm not sensing any phase shift or trying to stabilize any signal here, and I don't get how the PLL magically produce a 400MHz clock. From the point of view of a microcontroller, a PLL is just a frequency multiplier. It takes some reference frequency like from a 10 MHz oscillator and generates all the ...

0

If you use a discrete bipolar with 1uA collector current, set by 4.7Meg Ohm resistor to +5v, and Cob of the transistor is 10pF (for example), you'll have a time constant of 47 microseconds. A 200 microsecond IR pulse should be adequate for detection.

1

Remove the two LEDs (over by the connector in your picture.) Lighting them uses current. Not much, but you don't really need them. Increase the resistor in series with the IR emitter LED. (2.) will probably have the most effect. It will probably also reduce the detection range. Use a camera to find out which of the two LED like things is the IR emitter (...

0

I see two options here Option 1 - You could spend some more money and get a purpose built PIR module with ultra low power consumption. Panasonic have a range for this purpose, one of the lowest power versions is the EKMB1107113 with 1.9 uA current draw. These are not cheap though and cost around £20 in the UK. With one of these you could put your MCU in deep ...

3

You dont want to mess with an intel, no. Not a good starting path at all. Unless perhaps you run one of the 8086/88 simulators, but even then I would not start there. As far as learning assembly goes, pdp11 (not joking), msp430, arm thumb, arm, and a few others are good starting points, build a good foundation then each subsequent instruction set is easier....

0

How about a fun version that's ALMOST bare metal? The actual silicon for the old 6502 chip (the cpu inside the original Apple-II,) has been completely taken apart by hobbyists, and you can play with it online right now. Type in some opcodes. Single-step through it, and watch the voltages changing on the aluminum traces inside the chip. Zoom in to examine ...

0

In college, i programmed a Motorola 68000 firmware board in assembly. I had to actually look up the opcodes and type them in. It looks like similar boards are still available. http://www.easy68k.com/paulrsm/mecb/mecb.htm

0

If you have an old MP3 player supported by Rockbox, you might find looking through the source code used to boot the player very interesting. For example, on a Sandisk Clip, you can see the bootloader which is branched to immediately after the device finishes running its onboard mask ROM: https://git.rockbox.org/cgit/rockbox.git/tree/bootloader/sansa_as3525....

1

Would it be possible to purchase something like an Intel i7, and, execute the assembly (compiled binary) on the chip without a whole bunch of peripherals? No! But you could use a simpler CPU which requires very little support circuitry. I know in "build-your-own-computers" there's the CPU, Motherboard, RAM, monitor. power-supply, etc. but what ...

0

Back when "CPU" meant a box with switches and light on the front panel, Then the minimum configuration would be the CPU itself, and a memory system, and the bus that connected them, and the power supplies.* Then, you could use those switches and lights to examine and modify memory locations and the PC register, and at least one of those switches ...

0

Your best bet is going to start with a simulator. Check this out: MARS MIPS simulator You can use this simulator to write assembly code that you can then compile and run. I took an advanced embedded systems class and we used this simulator to write simple programs for a MIPS processor. If I remember correctly we used this book to learn about the architecture:...

0

If you want to know everything about assembly language for the Intel processors I would check out Randall Hyde's "The Art of Assembly Language Programming" book. Its downloadable as a free PDF on his website. https://www.plantation-productions.com/Webster/ He goes through everything from basic logic optimization to the details of how to program ...

1

This is a pretty good resource if your learning the x86 instruction set: Intel Microprocessors I used this book to build my own 8088 microprocessor computer, I started with the processor and ROM and then worked my way up to adding RAM and peripherals (like I/O). Very educational. Because x86 instruction sets built upon the previous set, the instructions are ...

2

Sounds like you want to work with a microcontroller. You can write assembly language code easily for an 8-bit microcontroller. You could use an Arduino board and AVR Studio and program it through the ICSP header with an appropriate tool. Or a PIC etc. It's feasible to program ARM and even more complex chips in assembler but there is a lot of tedious setup ...

0

The pin is floating, so you must pull it down to ensure the regulator remains off. That is indicated in the (typical) 10nA EN input current shown in the datasheet. There is no maximum listed so you're gambling with resistor value if you make it really high, but let's assume 1uA is safe. So you could use a ~1M resistor or 100K. And maybe parallel it with ...

0

It is common to have power up sequences with certain priorities given to certain voltages when this is required by the “device”. Say a 1.3V supply may need to be established before the 3.3V supply or 5V is applied, and so on, and then the clock etc. So, a voltage monitor IC may already be enough for you to be doing that, like it monitors the first priority ...

0

If you want your LDO being off during startup, you will have to ensure its EN pin is low. That's the reason this thing has one of these. Leaving it floating is nothing I would consider for a professional device. If you are concerned by the current draw of the 10K pulldown, consider using a bigger one. 200k or more. Should be more than enough to pull EN ...

0

Here's my version of a short-circuit trip circuit, using an electromagnetic relay.

0

Overview What you probably want is called a current foldback. These used to be in common use back in the day before your time but well within mine. They look something like this: simulate this circuit – Schematic created using CircuitLab The above example will respond when the current exceeds about one $V_\text{BE}\approx 650\:\text{mV}$ across \\$...

0

Here is a re-drawn version of your "short circuit" protection circuit. simulate this circuit – Schematic created using CircuitLab First let's consider the switch open state (i.e. there is no short). There is no way for the gate voltage to be higher than the source voltage, so the mosfet will be in the cutoff mode, leaving D2 off (undesired). ...

3

I had a quick look at the datasheet. I'm not familiar with this particular microcontroller, but I've used a lot of other Cortex M0/M3/M4/M7 chips, including low-power and high-speed ones. So I'll answer in slightly more general terms. This microcontroller is described as an "ultra-reliable, general purpose automotive" device. That doesn't sound ...

0

Depending on the application of your crystal, if its connected to a microcontroller with configurable clocks, you might be able to divide the clock with the MCU with a large divisor and then have it toggle a testpoint-gpio. Say divide by 128, you get a 62.5KHz signal that would be pretty easy to measure with almost any ADC/frequency counter during factory ...

1

The user is looking for 2 outputs from the design. (Long press and short press). In my design, X1 is the button. When you close it, point A will have 3.3V instantaneously making this short press. If the switch is closed for more than 6 seconds, then point B will also have 3.3V, making this long press. This delay can be adjusted by changing R3. In this config,...

0

If the chip can measure up to 30A RMS current, it means that the peak current for sinusoidal current is 1.414 times 30A. And the overcurrent detect threshold can be set up to 1.75 times the 30A RMS current. Therefore it might be that the ADC instantaneous measuring range must be larger than 30A, and it must be at least 1.414 times 30A to measure peaks of ...

0

You always have unsigned 15-bit fixed point number with 14 fractional bits, not 16 with 15 fractional bits. Why would you report 60A with a device that measures 30A: Because the power meter is subject to inrush currents, motor starting currents, ... that last for short time, but you want to record them even if they are outside the precision tolerance or ...

2

As pointed out in the comments, the issue was coming from a "weak pull-down syndrome": I simply changed the pin declaration to MY_LED = Pin(15, Pin.OUT, Pin.PULL_DOWN) and the problem went away.

0

Your best approach for determining the frequency is to use the earlier suggestion of having some software on the MCU produce a low frequency output and measure that with a (calibrated) frequency counter. However, your most likely issue is the magnitude of the oscillation -- this is determined by the quality of the crystal and the parasitics and components ...

1

If you want to see whether the PIC oscillator runs with the crystal, then turn it on and see whether it runs. Design is the time to be doing margin testing, to see whether a spread of crystals and a spread of PICs at a spread of voltages all start up and run reliably, not production. By production, you've established a crystal supplier and a PIC supplier ...

0

Moved on with power architecture 2.

Top 50 recent answers are included