Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
40 views

ADC with PWM glitch [duplicate]

This code is for PWM works as long as the line ADCSRA |= (1 << ADSC); is commented out. But when I remove the comment, it doesn't work. I don't know why that ...
0
votes
2answers
43 views

I2C Put One Termination Res at the End or on Each Slave Board

I Have a system with I2C bus wired just like this: My questions is which one is better: put the termination pull up res at the end of connection (on the last board), or put pull up res on each slave ...
1
vote
1answer
103 views

PWM with ADC - ATMega16

I want to write code where I move the wiper of the potentiometer clockwise so it applies PWM on a pin, and when I move it counter-clockwise it applies PWM on another pin. I could do it with Arduino, ...
0
votes
3answers
47 views

Really occasional malfunction of the Schmitt-trigger input

I'm using some Schmitt-trigger inputs for debouncing the interrupt problems. Referring to above circuit, the circuit has a RC circuit and the output of the RC circuit goes to the Schmitt-trigger IC(...
0
votes
1answer
38 views

I want to use 4x MicroServo with 9V battery

I have 4 Tower Pro MicroServo 9g SG90 I want to power with a battery. This is the datasheet I found online. I have a small breadboard and some resistors laying around (220, 1k, 10k), and a 9V battery....
0
votes
1answer
38 views

MASTER Clock output from one micro to another vs independent clock src

I have a Small STM32 Nucleo board where the on-board ST-Link debugger has an 8mhz crystal for the debugging microcontroller. That microcontroller is set up to output its MASTER clock, in other words ...
0
votes
1answer
49 views

RS485 Rx signal connected with two drivers

I wonder why is RS485_Rx is connected with two line drivers while RS485_Tx is connected with only one line driver. Is this some mistake in the schematics or is it some standard circuit for RS485?
0
votes
0answers
46 views

NMI Input circuit on a MCU

This circuit is connected at the NMI input of a MCU. The 'J2s' pin is connected to an external signal. Is it some sort of delay circuit or some filter circuit? Edit: J2s is digital signal coming ...
1
vote
1answer
47 views

GPIO Configured as Input OR Output

Is it possible to identify looking at the schematics whether a GPIO pin is configured as Input or Output pin for the case in following image? PIN93 and PIN94 of a MCU are connected directly with ...
0
votes
2answers
86 views

STM32F407VG Pin Assignment

I am new to the STM32 world. I am using [STM32F407VG]1 (100 Pins pkg). I have to select an 8-bit port for connecting 8 digital inputs to the MCU.. but the datasheet shows so many alternate as well as ...
1
vote
1answer
52 views

Optocoupler 5V to STM32F407 3.3V

I have to connect 8 optocouplers as shown in the picture with STM32F407 MCU. These are giving 8 digital signals to the MCU. The supply voltage at the outputs of optocouplers is 5V DC while the ...
0
votes
0answers
61 views

Analog input and high current output in one IO-pin

I am designing a more or less modular I/O Card and I need to supply a switchable 24V high current output for some sensors and also want to use the same port as an analog input for sensing voltages up ...
0
votes
1answer
70 views

Fingerprint scanning repeatedly

I am using 2 fingerprint module to make an attendance machine. Normally i have seen the attendance machines just need the user to put his/her finger on the scanner and it is scanned.. then next ...
0
votes
1answer
30 views

MCU + MUX + Multiple gyros

Is it possible to get time synchronous samples from multiples gyros (16 is what I'm trying to use right now) using an MCU and a multiplexer? I'm new to HW/embedded SW, but I was testing some fusion ...
1
vote
1answer
100 views

Optocoupler is failing to isolate circuit

I have a circuit in which I am trying to use an microcontroller to activate a car horn. I've had a lot of trouble trying to isolate the horn from the rest of the circuit. I have the microcontroller ...
-1
votes
1answer
38 views
1
vote
2answers
60 views

LED Matrix Leakage LEDs

I'm doing a LED matrix design and it's a cathode row design. Attached is a picture of my matrix design. The design works ok and I can show any pattern in the matrix. The problem is when a leak LED ...
1
vote
2answers
77 views

Trouble getting USART working on STM32 (stm32f103c8t6)

I started working with with stm32f103c8t6 recently and I was able to set GPIO to input and output, however when I try to set USART it just does not work. I'm trying to write directly to registers, ...
2
votes
2answers
114 views

Any Methord to overcome Main supply voltage fluctuations with ADC value readings?

Updated: I have a circuit for monitoring fan regulator speed change using ADC (as shown). But the problem is: In case input supply voltage (230V) varies due to some over-voltage or short circuit, ...
0
votes
1answer
67 views

Current sensor connected with fan regulator

Circuit diagram is shown. Input of FAN is connected to current sensor through a regulator My question is: Is it ok to measure AC current through this sensing IC (ACS712) when fan speed changes?
-1
votes
1answer
134 views

Processor speed for generating PWM at 1 MHz

I want to generate square pulses at around 1 MHz to drive an H-bridge inverter. Now, I want to choose a suitable microcontroller, microprocessor, or a DSP board. I need to generate a few pulses (...
1
vote
1answer
57 views

What are the use cases of FIFO Half-Full and Three-Quarter Full interrupts in Receive FIFO of a UART?

I am implementing a protocol decoder which receives bytes through UART of a microcontroller. The ISR takes bytes from the UART peripheral and puts it in a ring buffer. The main loop reads from the ...
0
votes
1answer
86 views

Circuit for measuring voltage with ADC when it exceeds microcontroller limit (3.3V)

I have connected ADC to the microcontroller. The maximum ADC voltage range of microcontroller is 3.3V. i want to measuring ADC input voltage in between 0V AND 3.3V So when ADC voltage is greater ...
0
votes
0answers
19 views

Can FOTA be performed by changing the execution point of the code i.e, changing the program counter in lpc1759

For FOTA can we divide the memory into two blocks, eg : block A and block B. And whenever there is a new version of firmware detected, we shall change the execution point of the code. Is this ...
0
votes
1answer
74 views

Looking for STM32F4 Vdd 5V

I have to replace Renasas M30853 MCU with STM32F407 MCU in a circuit. The earlier MCU uses power supply Vdd = +5V as well as all the analog and digital circuit that is connected with it. How can I use ...
1
vote
3answers
139 views

555 Clock Circuit - how to choose resistor value? [closed]

I need to design a 555 clock circuit to output a clock pulse of a specific frequency. The circuit I'm using is this one (from here): I've used this circuit before and it works fine but the website ...
0
votes
1answer
70 views

What is the XTAL clock used for in an 8051 microntroller?

I'm trying to design an 8051 microcontroller circuit which uses timers/counters, and the circuit I'm using for inspiration uses a clock generated using the XTAL1 and XTAL2 pins of the IC, shown in the ...
0
votes
1answer
37 views

How to read multiple sensors, store into an array, sort and then do something with the results—Arduino

I have a small project that I could use help understanding how best to move forward. I have a set of 8 batteries of different voltages and age. I’d like to read the voltages of all, assign an ...
0
votes
2answers
125 views

Do I need a resistor on the base of a transistor?

When I am connecting an IO pin of a microcontroller to the base of a transistor, do I need a current-limiting resistor between the IO pin and the base? Or can I just directly connect the pin? My ...
1
vote
0answers
103 views

STM32 SDMMC & SDIO - why max 1 SD card only?

I'm writing an SDMMC driver for my C++ RTOS for microcontrollers and there is one thing which really puzzles me, making it hard to decide about class hierarchy. In the Reference Manual for STM32F7 (...
8
votes
4answers
1k views

Can I put vias on routing I2C lines traces on FR4 PCB?

I am using a MSP430FR2633 micro controller and ADS122C04IPWR DAC over I2C at 100kHz. Can I route the I2C lines through vias in a 2 Layer PCB?
0
votes
2answers
50 views

Selection of External Current Transformer

simulate this circuit – Schematic created using CircuitLab I am designing a product for motor protection circuit. where I want to use customized external CT for application which gives me ...
0
votes
2answers
53 views

Setting DDRx register before PORTx register or after AVR cores?

Please explain me why DDRx register must be set in some situations after setting PORTx register.
1
vote
2answers
116 views

Transistor weak current when switched from microcontroller

I have ATMEGA328 (running on 5V) connected to a C4793 NPN transistor which controls the TEC1-12706 thermal component. I'm using the code below to turn the transistor on and off: ...
2
votes
1answer
64 views

Way to reset an MCU when it's GPIO output becomes constant HIGH or LOW instead of a low frequency PWM

In one of our projects, we are observing MCU hanging up supposedly due to EFT. WDT is not helping. The only way to get the device into working condition is to reset the MCU by reset pin or power cycle....
0
votes
1answer
40 views

Reset MCU with a 1-0 button

I am working on a silabs C8051 MCU. It has a sleep mode which should be woken up by a reset. The mcu should start working (wake up from sleep) when the button in connected to Ground (Otherwise it is ...
2
votes
3answers
47 views

Does the addresses of an arbitrary peripheral register can be used to store data randomly during code execution?

I need to make sure of the concept of volatile qualifier in C-language. so volatile is used when we don't want the compiler to optimize the variable being identified as a volatile or in other words ...
1
vote
2answers
25 views

How to enter into ISP mode through 'reinvoke ISP' in LPC1759

In LPC1759, I entered ISP through "reinvoke ISP" with the following steps Disable PLL Reset timer 1 Re-map interrupt vectors Set watch dog timeout Reinvoke ISP After entering into ISP, What exactly ...
0
votes
0answers
22 views

How to use f_forward function in FatFs

I have to read a file 100kB big using FatFs in a microcontroller to send it via an AT TCP-IP modem. An obvious method would be doing f_open() calls, but I am curious how to use the f_forward function. ...
1
vote
1answer
78 views

Is it possible to replace STM32F407 Internal Bootloader

I am new to the STM32 world. I know that all STM32 MCUs come with an internal bootloader. Is it possible to replace it with custom boatloader?
0
votes
1answer
42 views

Which Approach is Better to Drive Brushless DC Motor with PWM Duty Cycle

I'm doing a project that use brushless geared DC motor, the motor is connected to a moving platform. I will drive the motor with PWM, the motor then move the platform from -a degree to a degree ...
1
vote
0answers
35 views

USB CDC device send response of first for second data

I'm working using atmel studio 7.0, the code which i'm using is USB Communication Device Class (CDC) for ATSAMD21. My application is to read the command from the host to the device and perform the ...
0
votes
1answer
52 views

TrueSTUDIO look and feel

I have used Keil uVision and Microchip MPLABX IDE's a lot for various MCUs. Now starting to use Atollic TrueSTUDIO for STM32 MCUs. But even after spending many weeks on trueSTUDIO and building many ...
-1
votes
1answer
32 views

How much load for a given source? [closed]

Given a micro controller with X Volt DC power supply, what is an easy way/rule of thumb to determine how much devices I can connect to the controller (assuming each device requires Y Volt DC)?
0
votes
3answers
55 views

Checking how many inputs (reed switches) are active using minimal GPIO pins [duplicate]

I've been a programmer, for a while, but I am new to the hardware aspect of things so I apologize for my lack of knowledge. Just for a fun project to try to get better with hardware, I've decided to ...
0
votes
1answer
21 views

Built-in Timer Module HCS12

Why is it preferable to use the built-in timer module rather than using assembly language coding to create delay loops? I've gone through the entire "HCS12 Microcontroller and Embedded Systems" book,...
0
votes
1answer
50 views

STM32L4 Reset Issue

I have been facing a reset issue. My controller resets randomly. I have Codded for the source of reset at the begin of the routine. For the testing the code I made the system reset on purpose and ...
0
votes
3answers
101 views

How to supply a very accurate ADC reference voltage to STM32?

Every voltage regulator IC has atleast a variation of 2% or something. This can make the ADC reading way inaccurate if it fluctuates to those levels. What is a robust and common solution to this ...
1
vote
2answers
104 views

Summing multiple audio signals while keeping a copy of the originals

First off, I'm a programmer and I have only a little experience with electronics and I'm aware that what I'm after may seem a little ludicrous. My goal is to process the audio of an electric guitar ...
0
votes
0answers
24 views

AuCM350 UART interrupt

i am using ADuCM350EBZ evaluation board,i want to enable UART interrupt, like when i enter any button from keyboard then interrupt will occur. i am using one example given in this board here uart is ...