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.

1
vote
1answer
38 views

Motor Speed Output Signal [closed]

I need an advice. I just got a DC motor and its controller board. On the controller board it has 6 pin/wire: +12V, GND, PWM, ENABLE, DIRECTION, SPEED OUT. What I want to know is how do I interpret ...
0
votes
3answers
65 views

How does PWM work in the Arduino?

The problem that I have is that I can't understand the working of PWM in Arduino, even though I totally understand what PWM is. Like the Arduino has a 980hz refresh rate (~1ms clock speed) on two of ...
1
vote
1answer
49 views

LCD suddenly stops displaying

I am using a PC2002LRU-BWB-H-Q LCD with a STM32F4 micro and is powered through a TMP10424. There is also some 3V3 and 5V modules to. The problem is that the LCD is displayed fine for over days and ...
0
votes
1answer
63 views

AD5933 is not working with external clock

I am using AD5933 impedance measurement chip. There is an option to connect an external clock. I am using a function generator to give 250 kHz, 2-volts peak square wave signal to MCLK pin, but it's ...
0
votes
2answers
67 views

Simplest option for generating audio tones?

I'm looking for the simplest way to generate audio tones. Something like a square or sine wave, but I want multiple tone options. For example, two quick beeps, one at 440Hz, one at 1Khz. The tones ...
0
votes
1answer
47 views

Volume Control for Mixer Circuit using DAC Refence

I am mixing two stereo audio signals together and would like to control the output volume using the (0-3.3v) DAC on my microcontroller. I'm wondering if there is a simple modification I can do to this ...
0
votes
1answer
100 views

Pic Programming - Nested Loops

I'm having some problem with my code and I can't get my two loops working properly. I'm new to C programming so I might have got the basic loop concepts wrong. I've got 10 LED lights connected to my ...
0
votes
1answer
68 views

Unable to Read BME280 using TM4C123 LaunchPAD

I'm new to the Tiva Platform for the past two days I'm trying to read data from bme280's data registers. However, it always returns a 0(I2C bus not working). So far I've tried using this sensor with ...
0
votes
2answers
78 views

Is it possible to toggle a pin between “ground” and “not connected”?

I am trying to control a pump (ismatec ecoline V380) from a microcontroller (xmc4300, infineon) using an analog interface. The pump takes several inputs, most importantly: the speed (from a current ...
0
votes
1answer
26 views

interrupt-on-change on 8051 microcontroller

I am trying to read the speed or number of rotations pulses of a self-made encoder motor. I am using an AT89C52 microcontroller. It gives external interrupt on rising or falling edge. How can I ...
0
votes
0answers
89 views

Handling Large Variable Data with a Microcontroller

What is good practice for storing and manipulating variable data in a microcontroller circuit when the data may exceed microcontroller working memory? In my application, I am designing an access ...
0
votes
1answer
35 views

DMA Init code for ADC sampled data

I am trying to figure out how this DMA Initialization code is used to sample following 4 ADC channels and save data in 'adc_data'. ...
0
votes
0answers
35 views

Change SWD pin Back to SWD mode at run time in STM32F030F4

Im using PA_14 (SWCLK) as Output mode in stm32f030f4 microcontroller. I change state of this pin to output mode for a buzzer that is not in service at all time. At the end of the buzzer function I ...
1
vote
3answers
94 views

Bipolar signal used in differential ADC

I'm trying to find a way to convert a bipolar signal from a load cell (Futek) to an input for a differential ADC on a TIVA microcontroller(TI TM4C123GH6PM). The load cell's amplifier outputs a bipolar ...
0
votes
1answer
33 views

Is Pull-up present by default?

I'm using the MC9S12DP512, Motorola's microcontroller. I was executing a service and ,at the end, I put low logic level at the pins PS4, PS5 and PS6, then after that, I configured these pins as inputs....
3
votes
4answers
4k views

How is the internal pullup resistor in a microcontroller wired?

I am constructing a circuit where 2 microcontrollers will communicate with a high or low state on their IO pin. Basicly a state pin for Bluetooth connected, or not. One microcontroller will have an IO ...
2
votes
2answers
124 views

How to calculate total current, power, energy consumption from device?

I have a circuit/device that using ESP32 as microcontroller. I want to calculate how much total current and power that my device drawn. So, the current draw will be like this: My question is: The ...
0
votes
0answers
44 views

GPIO output impedance from Microcontroller Datasheet

I am building an application around the Texas Instruments TUSB3210 USB Microcontroller (Now obsolete, not on market) I referred to this datasheet to try and estimate the maximum current that can be ...
0
votes
0answers
16 views

Chaging EA/VPP by software on Intel MCS-51/8051

I'm designing a circuit that uses the combined Program/Data bus from Intel MSC-51 as advantage. By the MCS-51 specification it has an internal 4K ROM and a EA/VPP pin that if set to high will access ...
1
vote
1answer
68 views

Finding ADC pins from Init code

I am trying to figure out the GPIO Pins that are used for ADC input looking at the following ADC Initialization code for STM32L476RG. ...
0
votes
1answer
60 views

how to enable FPU in cubemx

For STM32F407 Discovery board how do I enable its FPU from CubeMX? The following instruction is used in handwritten code. How can I get it generated from CubeMX? // Enable FPU SCB->CPACR |= ...
1
vote
3answers
102 views

Is there a low voltage LED alternative?

I am trying to create a tiny little watch that is supposed to run off a coin cell (because it is so tiny) and basically just a microcontroller with a 30ppm 1Mhz oscillator that counts upwards. The ...
0
votes
0answers
14 views

Low range of voltage from a potentiometer connected to Toolstick card Silicon Labs

I have a linear potentiometer of 10k ohms which I connected to a toolstick Card (a microcontroller distributed by Silicon Labs). I used the ADC of the card to convert the analog voltage to digital ...
0
votes
1answer
21 views

Using port 0 in AT89C52 without pull up resistors

So at my university professor gave us following scheme to program this double 7 segment display on the right. At start I tried to simply adress it using P0=(someData) although it didn't work. Then I ...
0
votes
1answer
44 views

Does direct GPIO communication between 2 microcontrollers requires pull up/down

If I want to use GPIO pins of two microcontrolles as a mean of simple communication (e.g. reporting an event by sending 1 or 0), Do I need to enable internal pull up or pull down resistors on any of ...
0
votes
0answers
32 views

SIM800L Disconnecting Issue

I'm doing a project using SIM800L ebay module.I can send & receive SMS & calls. The problem is, on workbench its working, but in actual site environment when the GSM signal is low & it ...
1
vote
1answer
34 views

Interference from well pump pressure switch and microcontroller

I am using the Parallax Propeller to start and stop timers for an auto racing timing system. Out of 250 cars there were timing issues with about 10 or so. It was very random and hard to diagnose. I ...
0
votes
3answers
70 views

What is the safest way to trigger an output?

I need to trip a 12V output with a signal. In other words, I will send a signal through the output of my microcontroller and ...
0
votes
1answer
109 views

STM32F746 - DISCO I2C HAL_TIMEOUT

I am attempting to implement I2C interface on the STM32F7-Discovery Board using the a VEML 6070 UV light sensor (https://www.vishay.com/docs/84277/veml6070.pdf). The 7-bit slave address for the ...
1
vote
0answers
19 views

Can I set one relative axis and one absolute axis in a mouse HID descriptor?

I'm building a custom Bluetooth mouse using an ESP32 with a proximity sensor for the Y coordinates and a gyroscope for the X coordinates and was wondering if setting the X axis as relative and Y axis ...
0
votes
0answers
28 views

Can I use the st-link/programmer on nucleo l432kc to program external baords?

Can I use the st-link/programmer on nucleo l432kc to program external boards? I know that I need the SWCLK and SWDIO pins and they don't seem to be connected to external headers but I saw some people ...
0
votes
1answer
45 views

Why always in communication protocols R/W configuration,Reading is configured by “1” and writing by “0”? [closed]

when a microcontroller communicates with another one via one of the communication protocols there is a configuration bit in a control register to choose whether to send(write) or receive(read) this ...
0
votes
1answer
61 views

Wiring a Logitech extreme 3D pro joystick for Xbox adaptive controller

The joystick only allows direction movement when connected to the Xbox adaptive controller, which doesn’t help when I have 1 hand and 17 buttons to connect. There are only 10 buttons of the joystick ...
1
vote
3answers
158 views

Overvoltage protection with zener - How do you get a sharp knee clamp for analog input?

I'm working with an MCU that sees a 0-5V input range. I have a possibility where they may accidentally see 12V (user error). My problem is this analog input using a 5V Zener has a knee that isn't as ...
1
vote
1answer
129 views

Does this criss-crossed GND plane look like it will function properly?

I'll be using it at 12 MHz and... not the best parts placement resulted in this board layout. So I am asking more experienced people if it will definitely not work or maybe it will. Thanks! edit I ...
1
vote
1answer
93 views

LTC4418 interfacing VALID1 with a microcontroller

I want to use LTC4418 fuctionality of detecting which one of power supplies is on at this moment. Here is my approach to it: PS_VALID1 is connected directly to VALID1 of LTC4418 (without any ...
-4
votes
2answers
104 views

What is the best liquid level sensor [closed]

I need a sensor for measuring level of liquid in a tank. The method of measuring should be non contact type. Please give any suggestion. I want to interface the sensor with a microcontroller like ...
6
votes
2answers
208 views

ATmega328p sine wave generator, frequency capping at 1200Hz

I'm currently implementing sinewave generator on ATmega328p (16MHz). My project is mostly based on this article https://makezine.com/projects/make-35/advanced-arduino-sound-synthesis/. In brief, I ...
0
votes
2answers
82 views

Measuring power draw of more complex loads such as switching PSU

I'm trying to create an extension cord capable of measuring the power draw of devices connected to it. My approach is using a microcontroller with a non-invasive HWTC current sensor. I am using an ...
0
votes
1answer
110 views

Detect Infrared beam projected onto X-Y plane. Save and display coordinates. CMOS sensor?

I'm working on a project in which an IR laser is pointed perpendicular to the surface of an X-Y plane (Think like the old game "Duck Hunt"). I don't know where the IR beam will land on the plane but ...
0
votes
1answer
126 views

SD card single write block

I'm presently writing the code for SAMD20 micro-controller and SDCard. I'v successfully written code for single block read and multi block successfully. I'm testing my code with San-disk 16 GB SDCard ...
1
vote
2answers
108 views

Power drop on AC-DC converter due to relay

A uController circuit is powered with an AC-DC converter. This circuit in turn acts on some relays to turn on and off some loads. We have two bi-stable relays and another simple relay (Omron G5DN-1A) ....
2
votes
3answers
149 views

I2C weird data and clock output/input

Hello I am trying to communicate that is using SMBus. So when I try to send a data which was 0x0D and address of the device was 0x16. I see something like that on the data line: And this is how my ...
-3
votes
1answer
137 views

How MCU pin reads whether it is being pulled up or pulled down?

I am a beginner in electronics. I searched on the web about Pull up and Pull down concepts. As far as I know, 1) When an MCU pin is pulled up, a small amount of current pass through the pull-up ...
3
votes
1answer
124 views

As a computer science engineering graduate, do I need to learn Assembly language in today's day and age? [closed]

Given that there are simple and easy to learn/use MCU devices such as those offered by Arduino, Particle, TI (MSP430 series), Microchip (PIC16 series) does it make sense to teach ALP to computer ...
2
votes
1answer
55 views

My PIC16F628As keeping dying with a Pickit3

I have hooked up my PIC16F628As to my PICKIT like this: simulate this circuit – Schematic created using CircuitLab Yet 3 already died after a few writes, yet the datasheet claimed to support ...
3
votes
4answers
930 views

Purpose of level-shifter with same in and out voltages

I am looking at a schematic for the Pixhawk 2 board (page 3). The UART ports on the microcontroller are sent through a level-shifter chip (TXS0108) where the input voltage is the same as the output ...
0
votes
2answers
62 views

Setting pins as output Code - micro-controller

So i am using the MSP432 and i am confused on how the code for setting pin to desired function works. so for example from the manual i have found that: ...
1
vote
1answer
91 views

ESP-WROOM-32 layout USB-UART

I want my layout will include female headers to connect CP2102 MICRO USB to UART TTL Module 6Pin so I could just 'stick' it to my PCB while uploading the code. The 5V for the ESP will be supply from ...
0
votes
1answer
71 views

Using a MOSFET to turn on/off LEDs which could get reverse voltages

I formerly asked about a LED circuit a long time ago. The circuit I want to make is 'reverse-voltage notifier'. If the input is reversed, then a LED(below, D2) will lit. Of course, if the input is ...