Questions tagged [microcontroller]

A device which includes a central processing unit (CPU), memory, and (generally) an assortment of I/O peripherals (UART, ADC, DAC, general-purpose I/O, I2C, etc.) in a tightly-coupled standalone package.

Filter by
Sorted by
Tagged with
1
vote
2answers
84 views

5V Encoder output to 3.3V Microcontroller

I'm trying to design a circuit to connect this quadrature encoder AMT11 output signal to my microcontroller STM32L4R5ZIT6P that's running on 3.3V. Since the output from the encoder is 5V, if I ...
0
votes
1answer
65 views

The PID's initial position seems to be ignored everywhere. Why?

On Wikipedia, you will find this definition of the PID (position form) $$u(t)=K_p\:e(t) + K_i\int_{0}^{t} e(\tau)\:d\tau + K_d\:\frac{d}{dt}e(t)$$ In the same article, when you learn about the ...
0
votes
1answer
54 views

Powering 12 V LED strip from a 3.3 V esp32 including PWM

I'm developing an automation board and want the facility to PWM dim a strip of LEDs up to 5-10 amps @12 V. These are plain 2 wire LED strips, positive and negative, nothing special. My esp32 will be ...
1
vote
2answers
39 views

No connection from wired protoboard

I am using protoboards for the first time, and I can't seem to get the circuits I am making on them to work. I would have no problem getting these circuits working on a breadboard, but for some reason ...
1
vote
2answers
77 views

Minimum current required to toggle GPIOs on STM32 microcontrollers

While GPIOs on controllers (STM32F and L series with respect to this question) are voltage driven, do they require a small amount of current? If so, what is the minimum amount of current that is ...
2
votes
2answers
92 views

How to flash a bootloader to a ARM MCU from the factory?

I want to build a custom PCB with a ATSAMD21G18A-AU Micocontroller, which has a ARM® Cortex®-M0+ processor. I will get it from LCSC, so it doesnt has any bootloader preinstalled. Right? In the end I ...
0
votes
2answers
101 views

Zero current draw voltage divider equivalent

The problem: I am trying to read a DC analog voltage (from a battery) by an ADC on a microcontroller. This can be done by a voltage divider, but I am looking for a solution that has zero, or near ...
0
votes
1answer
69 views

Microcontroller MOSFET-driven RGB LED strip controller

I'm trying to DIY a very simple RGB strip controller, nothing fancy. The goal is that it has to be driven from a 3.3 V / 5 V microcontroller output, using some N-channel MOSFETs. I will control them ...
0
votes
2answers
88 views

How do embedded systems deal with virtual and physical memory addressing?

I'm referring to the Wikipedia page about virtual memory, the last paragraph in Usage section: Embedded systems and other special-purpose computer systems that require very fast and/or very ...
0
votes
0answers
26 views

RP Pico SPI MicoPython write order confusion

I'm using an RP Pico to program the FT8113 Video Processor, I have written the following code and the device boots up but does not return the expected 0x7C as stated in the datasheet. The programming ...
0
votes
1answer
41 views

How to flash MSP430G2211 MCU?

After experimenting a light sensing tool on TI MSP430G2ET with MSP430G2553, I designed a real scheamatic and PCB with MSP430G2211. I used MSP430G2211 because it has less pinout and smaller than ...
0
votes
1answer
81 views

Which sensor to use to detect when someone walks past the sensor?

I am working on a electronic project. The goal is to detect motion when someone starts walking up the stairs. When this happens data is send to microcontroller and lights are turned on.The problem is ...
0
votes
1answer
25 views

NZR signal and multiplexer 74LVC1G157

I'm trying to use a WS2812B addressable LED with a multiplexer 74LVC1G157. I have test code on an Arduino, and if I connect the LED to I0 or I1, the color of the LED changes, but the delay selector ...
0
votes
2answers
58 views

How to transfer data from high-speed ADCs in MCUs?

Some MCUs contain multiple high spped ADCs, e.g. STM32F303 has multiple 12 bit, 5 MSPS ADCs. Let’s say I am using just one of these to sample a signal. Because 12 bits will be represented/stored as 16 ...
3
votes
4answers
387 views

How can I shift the output voltage of an encoder to an MCU-acceptable voltage range?

I am using an encoder in my circuit operating on 5 V and the maximum output voltage of my optical encoder is 5 V. I am using the TI CC1350 Launchpad MCU to read the encoder signal, but the problem is ...
0
votes
0answers
16 views

RFM69HCW Digital IO connection setup

I'm working to setup an RFM69HCW transceiver with an ARM microcontroller. I've read over the datasheet for the RFM69HCW and I see that DIO0 is the interrupt signal, so I've broken that one out, but ...
0
votes
0answers
31 views

PIC32MX170F256B SPI

I bought a PIC32MX170F256B but struggle with the SPI module. The chip has dedicated pins for the clock but no clock is present after writing to the SPI1BUF register. The UART is working, the timers ...
-7
votes
0answers
53 views

please, logic for how to measure glucose using temperature in human body [duplicate]

I am not able understand logic that how to measure glucose level using temperature please help me finding the logic
-7
votes
0answers
65 views
-1
votes
0answers
37 views

Small RP2040 Reset Circuit

I'm working on designing a very small (approximately 1 sq inch) dev board based on the RP2040. I plan on including a small momentary pushbutton (or at least a header that can be easily bridged) to ...
0
votes
2answers
45 views

Driving a motor using SPST relay

I'm trying to drive a brushed DC motor of 24V and 7W (sorry I don't have the datasheet) using a power relay on a PCB using a STM32 microcontroller. My plan is to use my STM32 to control a transistor ...
0
votes
1answer
35 views

Can I download my code from Keil uVision5 or STM32CubeIDE to the STM32F103C6T6 board via FTDI?

Can I download my code from Keil uVision5 or STM32CubeIDE to the STM32F103C6T6 board via FTDI? If yes, then how should I do it? I can't find anything that helps online. If there is no method to do so ...
1
vote
0answers
59 views

Program MCU from another MCU

Can I use an ESP32 to program/flash an nRF51822 directly without a PC connected to the nRF? I am designing a VERY small device with two microcontrollers on the same PCB, and would like to save space ...
3
votes
3answers
1k views

What could prevent the start of MCU

Problem description I've got accassional starup issues on some boards with an ATmega2561. On about 10% (seems to fluctuate a lot!) the Processor does not seem to start on first power on. Only a power ...
0
votes
1answer
33 views

Read MicroSD card with USB reader while it is connected to (powered-off) microcontroller

I have created a small breakout board, where a microSD card is inserted and I can access its signals. Now, when the necessary SD signals are connected to an AVR microcontroller via SPI, they ...
0
votes
1answer
50 views

Parameters of One_Wire protocol function

How can we explaine the following line of statement in mikroC PRO for PIC Ow_Reset(&PORTE, 2); // Onewire reset signal I understand that ...
16
votes
5answers
3k views

Routing traces to and from a 48 pin microcontroller becoming a mess

I have a 48 pin microcontroller with VCC = 5V. I'm becoming worried that I have the traces too close and all the vias and crossing traces may mess with the signals' integrity. Are there examples and ...
0
votes
0answers
22 views

RL-TCPnet crash when send and get at the same time

I'm working on a web service with RL-ARM libraries. I want to send some parameters with AJAX as .cgx file and at the same time I want to create a socket and then send a lot of data to the destination. ...
0
votes
2answers
101 views

PCB design with h-bridge and MCU

I'm interested in adding two H bridge circuits to a PCB also holding a cortex M4 microcontroller. 12V/1A max motors. H bridge Ln298 H bridge. What design considerations should I make to isolate the ...
1
vote
1answer
70 views

How to suppress unused C library functions in SDCC compiler?

Previously I used the COSMIC compiler for STM8 development. In a cosmic compiler, there is an argument called 'SPLIT' which can be passed while using it on the command line. This allows the linker to ...
-2
votes
2answers
101 views

What type of code is being stored in microcontroller RAM section? [closed]

The program memory layout looks like this: But in every embedded forum it is said that: Code is being stored in flash memory, RAM memory is for data Therefore, ...
0
votes
1answer
30 views

How to interpret internal_ram data section in NXP

In .lcf (linker configuration file) in my project, in SRAM memory there is an internal_ram section: And in my case this ...
-2
votes
0answers
53 views

How to technically mitigate chip shortage? [duplicate]

We desperately need microcontrollers to produce our devices. From an engineering standpoint of view, what are the technical means to mitigate this situation that seems to be last a year or possibly ...
0
votes
0answers
36 views

How to change the provisioning state on esp32

ESP documentation sates: If provisioning state needs to be reset, any of the following approaches may be taken : the associated part of NVS partition has to be erased manually main application must ...
3
votes
1answer
152 views

Identify microcontroller

I disassembled a semaphore which I bought in the shop Flying Tiger And I found this microcontroller: And this is the board schematic: I think that it's a SOP236 and some kind of PIC or Attiny, as ...
0
votes
1answer
161 views

Why don't we see an MMU on a high-end MCU?

In the past, microcontrollers were fairly simple and had poor performance, making the idea of running a full OS on them not viable. Today, there are multi-core MCUs running at over 500 MHz (e.g. ...
1
vote
1answer
41 views

Finding a pass-through demultiplexer with latch/register on output

I'm currently working on an Arduino project with lots of digital IO (21 outputs, 8 inputs) and no analog IO. This is more than the number of digital pins on an Arduino Nano, so I started looking at ...
0
votes
2answers
75 views

Measure if bottle level is empty

Consider an upside bottle with liquid (water) oozing out from pinhole on head. I need to detect if water falls below a certain level. I searched and saw there are multiple sensors already available ...
0
votes
2answers
119 views

How many times can a register bit be changed in AVR?

I am writing a program for an ATmega328P. I have a while loop inside which I am enabling the UART receiver complete interrupt flag using the command ...
0
votes
1answer
80 views

Is it possible (and worth it) to store non-const program data in FLASH rather than in RAM?

I'm the situation that my program stack variables take 24kB, and global variables take 27kB. My MCU's SRAM is only 40kB. Would it be possible to store part of the data anywhere else? For example, in ...
0
votes
2answers
74 views

How can a slave device (microcontroller) communicate with a master device (Raspberry Pi) in SPI communication?

I saw several posts for SPI communication where they only explain that if a master wants to communicate with a slave, it will turn the CS/SS line low for the respective slave device. In my application,...
1
vote
2answers
83 views

How to string compare const uint8* in a ESP32 microcontroller chip

I'm sending data from an ionic app (typescript) to an ESP32chip. Data from the app uses protocol buffer format. Here's the code: ...
0
votes
1answer
57 views

What pins in Radar ECU and Camera ECU should be detected for OC, STG, and STB faults and why?

A typical Electronic Control Unit(ECU) performs Open Circuit(OC), Short to Ground(STG), and Short to Battery(STB) Diagnostics on selected internal and external pins in the ECU. For example, consider a ...
1
vote
1answer
82 views

Can a push button with a single click using an Arduino have more than one function?

I've tried to google this and failed, but I am trying to figure out if I can use a momentary push button and some controller like an Arduino UNO (which I have) to activate two LED lights, one after ...
0
votes
0answers
20 views

ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32 issue with IAR Embedded workbench

I've been working with ST link v2 programmer/debugger for a while with IAR embedded workbench. Recently, each time I start a debug session or I appoint a break point and I arrive at the breakpoint, ...
5
votes
3answers
941 views

I2S communication

I am designing an audio amplifier circuit which consists of an I2S digital MEMS mic (INMP441) for picking up voice signals and an I2S class-D amplifier (MAX98357A) for amplification. Both these ICs ...
0
votes
0answers
44 views

I2C via MCU works with FLAG_WRITE_READ but not FLAG_READ

I'm reading the date from an RTC via I2C using a SiLabs MCU. There are two different flag options, but only the 2nd one works. I'm new to implementing I2C, what is happening on the wire that works ...
2
votes
1answer
90 views

Connecting two different devices to multiple sensors without influencing the values

I'm currently working on a project to build a TFT dashboard for my motorcycle (based on an ESP32 as the main IC). I want to keep the original LCD dash and all its wires connected and just "split&...
0
votes
0answers
14 views

Configuration space for the PIC18F66K40 timer 0

I wrote a utility to accelerate analysis of timer configuration in embedded systems. This is not a replacement for testing; it's a convenience visualisation. The default configuration on load ...

1
2 3 4 5
164