Questions tagged [microcontroller]

This tag is related to questions that have something to do with a microcontroller. A microcontroller is a simple or small processor often with its program and execution memory on the same chip with input/output pins for controlling other hardware. Please specify the microcontroller and compiler or tools related to your question.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
12 views

Where to find THD and SNR ATXmega32 ADC?

I am trying to figure out the noise (voltage) introduced by the internal ADC of the ATXmega32E5 in terms of SINAD, and therefore using SNR and THD. By analyzing the datasheet of the above mentioned ...
g.mezzina23's user avatar
0 votes
0 answers
17 views

Unable to find root cause why i am unable to program the LPC54606 microcontroller

LPC54606 Unable to Connect to Target I am using LPC54606J512BD100 microcontroller and facing a very serious issue. The issue is that after successful programming and working with it the ...
rock123A's user avatar
0 votes
0 answers
26 views

How to find for how many second a push button pressed attached to microcontroller

I am new on the controller. I want to interface a microcontroller with push button. How I find the time of button is pressed. when we press button for one second it one LED is glow and similar for two ...
Bhaskar Jha's user avatar
0 votes
0 answers
14 views

Painting digitally with a microcontoroller [closed]

I paint digitally by using a desktop PC and a pen tablet. Since there is much temptation in computers, I want to create an environment where I can concentrate more on drawing. I am considering the ...
Shinichi's user avatar
0 votes
0 answers
44 views

LED Display data using RealTerm send option but no display if I connect my ESP to RS485 transceiver circuit

The LED should receive 32 bytes of data. If I send these 32 bytes via RealTerm, the LED can display it (I used USB to RS485 cable). So I am using various serial terminal just to check the output of ...
nyal's user avatar
  • 13
0 votes
1 answer
55 views

is there a code for delaying a microcontroller

I am programming a PIC16F84A microcontroller to monitor three doors, if one of the doors is open it should trigger an alarm and write D1, D2 0R D3 on a seven segment display. OR it should write ALL if ...
Darlington's user avatar
0 votes
0 answers
27 views

Why does my direct register access code fail to read DHT22 sensor in Arduino?

Function for reading DHT22 sensor with direct register access doesn't work. I wrote this sketch to read a DHT22 sensor without using libraries and using direct register and port access but when I run ...
turtulin's user avatar
1 vote
0 answers
27 views

Sleeping AVR64DD32 and waking up from button press

I'm trying to put the mentioned microcontroller (AVR64DD32) to sleep and to awake it by a button(PD4) interrupt. My code was inspired by this tutorial , but instead of blinking an LED I'm trying to ...
Simon's user avatar
  • 11
1 vote
1 answer
64 views

How can I reduce code repetition in this C code for PIC microcontroller?

I'm working on this serial communication project with PIC microcontroller. I'm using CCS C For PIC as a programming software. The code works fine right now but I want to improve my programming skills (...
Line Follower's user avatar
0 votes
0 answers
20 views

How to use GitHub Actions to automate verification of local hardware?

I've written a Python script that wirelessly tests a microcontroller-based device via Bluetooth Low Energy. I'd like to have this script automatically run upon push of new firmware to a repository. If ...
jie's user avatar
  • 31
0 votes
0 answers
10 views

Code Composer Studio: Imported driverlib project won't build lib

I'm trying to test a C2000 card by importing the "systick_ex1_interrupt" example from C2000Ware but when I tried to build it I got the following error: "gmake: *** No rule to make ...
AnthoJack's user avatar
  • 167
0 votes
0 answers
43 views

How can I read RFID card data other than its UID using RC522 reader and RPi Pico W and MicroPython?

I am trying to read RFID card data using RPi Pico W and RFID-RC522 reader. I tried all available tutorials and low-level mfrc522.py libraries but all it gives me is the UID of the card. I want to read ...
SaveTheEarth's user avatar
0 votes
2 answers
27 views

Does a software reset clear the GPIOs state on PIC24?

I am trying to find out if a software reset would cause the GPIO state to default back to a reset states on PIC24F? The reset command i would like to use: asm ("reset"); I could not find ...
Guillaume.P's user avatar
0 votes
1 answer
29 views

What is data striding?

In the DMA Controller description present in the datasheet of a Microchip microcontroller it states that the DMA has a "Programable independent data striding.." (see capture below) DMA ...
Lewis's user avatar
  • 1
0 votes
0 answers
84 views

How to set up and run Pico W bluetooth examples

I am new to the C/C++ world but I am trying to run the spp_counter.c example in the pico-sdk. When I run make I am getting this error fatal error: btstack.h: No such file or directory 58 | #include &...
David Davis's user avatar
0 votes
1 answer
40 views

How to detect when a voltage changes from high to low or low to high with micropython on a Pico for 20 different inputs each with separate counters

I have a mechanical button testing device that tests a couple different types of buttons but I need it to count every voltage drop from high to low and for the other type I need Low-high-low. From a ...
SamB_Iamtrying's user avatar
1 vote
0 answers
29 views

URI triggering all conditional logic Using the indexOf function

I have a code which Hosts a web server with an ESP-32S Dev Board And The Hosting Is Fine But The Logic Which Uses req.indexOf("/on") Is Not Working Properly. #include <WiFi.h> #define ...
Divyansh undley's user avatar
1 vote
1 answer
67 views

How can I corrrect the following formula so I'll read the acurrate temperature?

Currently I'm working with a MSP-EXP430F5529LP microcontroller and a LM35, because I need to built a thermometer. The results will show on a seven segment, 4 digit display. I'm using the following ...
Alexa Martínez's user avatar
-1 votes
0 answers
55 views

Serial communication using frdm kl25z and gps neo 6m

I have connected gps neo 6m to frdm kl25z and using keil to output data on putty. #include "MKL25Z4.h" #include <stdio.h> #define UART0_RX_PORTA1_PINNUM 1 #define ...
Nilesh Jamre's user avatar
0 votes
0 answers
64 views

Raspberry Pi Pico: Send 2 bits to PIO to trigger GPIO pins (one, the other, or both)

To drive two stepper motors via their stepper controllers I'm trying to control two pins (GPIO 16 and GPIO 17) on the Pico by using a PIO. The idea is, that a function in main determines, if either ...
Nuke's user avatar
  • 17
1 vote
0 answers
47 views

PySocks error with Whisper - how to troubleshoot

I am facing an issue where I need to use a microcontroller with Whisper, but due to the slow operation of the microcontroller, I am looking to use an API instead of a local model. Unfortunately, the ...
mogmol's user avatar
  • 11
0 votes
0 answers
34 views

picokernel library for msp430

Recently I interested in rtos applications and I wanted to use one of them. However, I read that msp430g2553 has quite small memory thats why freertos cannot be used with this (maybe I m wrong). then ...
enis's user avatar
  • 3
0 votes
0 answers
43 views

Interfacing VL53L0X TOF sensor with raspberry pi pico

I want to use the above mentioned sensor to measure distance with raspberry pi pico as the master. For i planned to use this library by Kevin McAleer but vs code shows errors in it thus i cant use it. ...
Anmol Goel's user avatar
0 votes
1 answer
46 views

Inconsistent Mpu6050 Readings | raspberry pi pico w [closed]

i connected mpu 6050 digital motion processor with 12c interface with my rspberry pi pico W. I coded it with micropython but when i read the accelerometer data registers, it shows in consistent values ...
Anmol Goel's user avatar
0 votes
1 answer
108 views

Why is the interrupt not working as intended on STM32?

I am trying to make a simple program that utilizes an external interrupt that controls which of the 2 LEDs will blink. Both LEDs can blink in the absence of the interrupt routine so the configuration ...
Fadi EID's user avatar
0 votes
0 answers
40 views

How would I spoof/open a com port from a microcontroller to a device with multiple ports?

I have a device which receives/outputs IrDA commands as well as receiving serial LED data from a product. Normally it plugs into a computer and a rx/tx tool specifically made for this function has a ...
user2708079's user avatar
0 votes
0 answers
18 views

TouchGFX for STM32H745XI

my project requires me to use STM32H745, and i also need to use the touch screen panel as there is a need for GUI. I searched for stm32h745 touchgfx, but there are no results for it, some even say ...
confusedfresher's user avatar
0 votes
1 answer
62 views

Executing arbitrary code on-the-fly via gdb on microcontroller target?

Let me try to explain what I'm looking for, as I couldn't find a better wording for the title. Let's say I'm programming an RP2040 microcontroller, and I can establish a debugging session with it ...
sdbbs's user avatar
  • 4,012
0 votes
0 answers
36 views

Raspberry pi pico and I2C prtocol

This is my code so far. It recognizes my IC and gets a reg addr and some random data. import machine sdaPIN=machine.Pin(0) sclPIN=machine.Pin(1) i2c=machine.I2C(0,sda=sdaPIN, scl=sclPIN, freq=400000) ...
user1237916231's user avatar
0 votes
1 answer
74 views

How to add external html script in micropython file

I am running a script of led turn on and off on my esp32 device from a web page. Like this: import machine led = machine.Pin(2,machine.Pin.OUT) led.off() import network sta = network.WLAN(network....
Shaair's user avatar
  • 9
0 votes
0 answers
53 views

Pi Pico Won't Connect to WLAN When Plugged into Wall. Works plugged into computer

I have a Raspberry Pi Pico W with the presoldered headers. When I run the following code (main.py) through Thonny on my PC I am able to connect to the internet no problem. When I try to run it after ...
jagord24's user avatar
0 votes
0 answers
41 views

Assembly language based on 8051

Here's my code for a simple 24-shot clock: $MOD51 ; This includes 8051 definitions for the Metalink assembler start: SETB P3.5 MOV P1,#0A4H CLR P3.5 mov p1,#99h LCALL wait mov p1,#0b0h LCALL wait ...
Linfoe's user avatar
  • 1
0 votes
0 answers
16 views

SVPWM Dwell time calculation and switching vector

0 I have modeled a SVPWM for a two-level, three-phase inverter. The modulation index for svpwm is selected as MI = 3Vref/2Vdc, the dwell time is selected based on sector and alpha (angle in each ...
무함마드's user avatar
1 vote
1 answer
38 views

Synchronization in the interrupr driven code (not RTOS)

I stuck with the following problem. let's suppose we have just a main-loop firmware without any RTOS. We have a task to fill the buffer in some periodic interrupt handler (let it be the timer ...
Leonid P.'s user avatar
-1 votes
1 answer
34 views

How to only enable servo when the input from sensors is changed in Arduino Uno?

I tried to write an Arduino Uno program for automatic watering system. I want to make the servo turned off after 5 second delay and stay disabled until the input from the sensors changed. But my servo ...
Dede Kurniawan's user avatar
0 votes
0 answers
166 views

WCH Link Failed to configure MCU

I just got a CH32V003 dev board with a WCH-LinkE-R0-1v2 and I am unable to make it work. It seems to have something to do with the WCH-LinkE-R0-1v2 firmware. When I try to re-update the firmware with ...
Renaud Gagnon's user avatar
0 votes
0 answers
30 views

PWM only works when I do a reset on dsPIC33EV256GM102

PWM Modul works discontinuously on the DSPIC Hello everyone, I am facing a small problem with PWM in my dsPIC33EV256GM102. I started with a very simple configuration to generate three different duty ...
Mouhamed Attya's user avatar
0 votes
0 answers
55 views

Sending 2D big array using ESPAsyncWebServer with chunks from RAM

I have very big problem with my code on ESP8266. I wanted to modernize my function to collect logs data and then send it all to browser. First I tried beginResponseStream function but my array is too ...
Michal's user avatar
  • 61
1 vote
1 answer
92 views

I'm trying to debounce a button in c++ for an atmega 328p microcontroller but nothing seems to be working

I'm still at a beginner level in C++. I need to debounce a button (PCINT10) using an interrupt and a timer. I'm using an atmega328p microcontroller and a HW-262 shield. Currently using timer0 to ...
Elle's user avatar
  • 11
-2 votes
1 answer
76 views

How to ensure that multiplication between unsigned integer will yield uint64 in C [closed]

I'm coding for an ESP32 that receives data through MQTT to set its deep sleep time. The problem is that sometimes the ESP32 will not sleep for the requested time. It is fine for smaller times < 1hr,...
DCrown's user avatar
  • 57
0 votes
0 answers
89 views

How to find correct port in linux and specify it in platformio

So I'm currently having trouble with selecting the correct upload port in the platformio extension using VS Code. PIO is automatically detecting /dev/ttyS0 as port which is not correct and produces a ...
user's user avatar
  • 1
2 votes
0 answers
54 views

Unable to send data with I2C using STM8s in C

I'm an engineering student and for my bachelor thesis I use a 16 channel IO expander which communicates with I2C with a STM8S microcontroller. IDE: STVD (I set the correct ARF6 byte) IO-ex: PCA8575 -&...
Joerie's user avatar
  • 29
0 votes
0 answers
38 views

How to send files from NAND Flash(connected to a microcontroller) to PC?

I have data stored of sensors in NAND flash using SPI Protocol with STM32H743 IC in file format(.txt)(multiple files are created in NAND flash). I want to take out that data from NAND flash and send ...
shrey gupta's user avatar
1 vote
1 answer
66 views

How converting a char on a esp32 can crash it?

i'm running into a problem understanding why my program is crashing while running on an esp32 processor and is causing it to repeatedly reset. I am working on a NODEMCU devkit version of the esp32. I ...
Jordan's user avatar
  • 701
-1 votes
1 answer
100 views

How do I assign a value to a variable once?

I need to assign a one-time value to two variables. 'keypressed' when the button is pressed, 'keyrelesed' when it is released. The rest of the time they should both have the value 'nokey'.When it is ...
Vatro's user avatar
  • 3
-1 votes
1 answer
65 views

Logic operator AND (&&) code composer is not working [closed]

I'm trying to write a code in which two conditionals must be meet in order to follow the cycle, but it's not working. If ((control = 10000 || control = 80000) && if((P2IN&0x02)==0) If I ...
Alexa Martínez's user avatar
0 votes
0 answers
83 views

Connect STM32CubeU5 B-U585I-IOT02A to WPA-2 Enterprise

I'm quite new to the STM hardware and embedded programming in general. My goal is to connect the B-U585I-IOT02A to a WPA-2 Enterprise WIFI (it needs to be that standard). I found the examples in the ...
Johannes G's user avatar
0 votes
0 answers
33 views

Trying to make a multiplexed counter with a MSP430

I'm currently trying to get a counter from 30 to 0 with a 4 digit 7 segment display using a msp430f5529 launchpad but I can't make it count and the display only shows "1". I don't know where ...
Alexa Martínez's user avatar
0 votes
0 answers
23 views

MSP430 atomic functions using GEI

I want to make a function atomic by turning off global interrupts: void func() { _DINT(); // disable global interrupts _NOP(); // preventing race condition because of pipelined design of chip ...
d4mb's user avatar
  • 33
0 votes
1 answer
85 views

How to send more than one value to my MQTT Broker

I am using an ESP32 microcontroller to read data via the sensor MPU6050. I am sending the data directly to my MQTT broker and then to a database (using Node-red). My Question is, how can I send 100 ...
ez.oez's user avatar
  • 1

1
2 3 4 5
72