Stack Exchange Network

Stack Exchange network consists of 174 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
2answers
60 views

Compile time calculations in C

I have been implementing a control software in C programming language. One of the software modules represents a communication table for some proprietary communication protocol. Each record in this ...
0
votes
0answers
12 views

How to get the RSSI value from an Xbee?

How do you make XBee send its RSSI value to another XBee? My goal is distance measurement and position estimation in an outdoor environment. The distance is calculated from the RSSI values.
0
votes
1answer
53 views

Convert ADC value to real voltage

I want to measure the input voltage to my circuit. The input voltage is supposed to be anything between 7 to 35 Volts. I have a micro-controller with 12bit ADC. I am using a simple voltage divider to ...
5
votes
2answers
328 views

Communicating between 2 different microcontrollers

My Arduino runs at 16MHz clock speed; another microcontroller runs at clock speed of 13MHz. If I send digital output directly from an output pin of the former to input pin of the latter, there will be ...
2
votes
3answers
42 views

why is this microcontroller brown-out level detection at 2.6V and 3.4V

The default brown-out detection level for the ATmega32u4 is 2.6V (typical) in the range of 2.4V to 2.8V. The table of possible values: ...
0
votes
1answer
33 views

PIC16F1827 Capacitive Touch Sensor not Incrementing Timer?

So I have a PIC16F1827 on a breadboard and was trying to get a simple demo working where I touch a wire to turn on an LED using the Capacitive Sensing Module. I was primarily going off this example I ...
0
votes
1answer
32 views

COMP2 to trigger One-Pulse mode on STM32L1

I am trying to use the output of COMP2 to trigger the One-Pulse mode of a timer (in my example TIM4, but it's quite flexible if it needs to change to another timer) on the STM32L1 series. In the ...
0
votes
0answers
12 views

Measuring recharge time and discharge time of VRLA/SLA battery in real time with MCU

I don't have any experience with batteries, so I would greatly appreciate some help with this topic. I did some research about battery SoC, gas/fuel gauge, coulomb counting. But all of that is just ...
0
votes
0answers
11 views

need a library for interfacing mcp2515 can controller with lpc2148 via spi

i need to set up communication between can controller mcp2515 and the lpc2148 microcontroller via spi.For which i need library file and if possible then some explanation or some reference I have some ...
0
votes
1answer
58 views

Design emission (harmonics)

I attached a image of ESP32's datasheet where it say to add a series 470 ohm resistor to Tx transmission line. I wonder is it talking about which line, what are the pins? And why that specific value? ...
0
votes
0answers
41 views

SPI Flash Read/Write Issue

I'm trying to write into SPI Flash IC using Quectel MC60 openCPU. I'm writing some data to a particular address and then I'm trying to read from the same, But I'm always getting all the bytes 0xFF. ...
0
votes
0answers
29 views

Voltage translation for vehicle throttle sensors

I am working on a EV car conversion and I'm replacing the original throttle pedal. The two throttle sensors of the new throttle pedal are different. That means the output voltages have a different ...
0
votes
0answers
18 views

Question on PID Design for DC motor, microcontroller-based

Is there a way that by using a microcontroller I record speed and current of a DC motor, then find its parameters and transfer function to further design and tune a PID controller? Kind of what MATLAB ...
-3
votes
0answers
18 views

Dc shunt motor control by PWM and regenerative braking based on microcontroller 8051 [on hold]

I want the circuit diagram of DC MOTOR CONTROL BY PWM method and regenerative braking based on microcontroller .power supply is battery.
0
votes
0answers
31 views

System Clock Measuring with Logic Analyzer

I have just started to use a basic logic analyzer. So my question is absolutely beginner. My device is the TM4C123GH microcontroller. And I would like to capture the system clock operation. But I do ...
0
votes
1answer
28 views

Interfacing an LPC2148 with a CAN module

I need to implement the CAN protocol to communicate between two LPC2148s. Now I am planning to use SPI for communication between a microcontroller and a CAN controller and then the CAN protocol for ...
2
votes
2answers
111 views

Controlling LP Gas burner with microcontroller: flame sensor ideas needed

I'm building a system using a microcontroller (like an Arduino maybe) to automatically control the temperature of a kettle of liquid being heated by an LP gas burner with a PID algorithm to turn the ...
0
votes
0answers
37 views

How could I make duty cycle (variable) decrease gradually in C?

I'm running a DC motor via PWM. Everytime I press a certain button, the duty cycle increases by 10%. When I press stop button, I make duty cycle = 0, and the motor stops suddenly. But what I actually ...
0
votes
0answers
48 views

Debugging a Invstate hard fault on STM32F4 microprocessor

I'm having a hard time tracking a source of the hard fault occuring in my program written in C++ for the STM32F405 microcontroller. I only use three sources of interrupts in this project - two timer ...
0
votes
1answer
54 views

STM32 F4 max GPIO toggle frequency [duplicate]

I just started using the STM32 F401VC Discovery Evaluation board and I'm trying to get the maximum GPIO toggling frequency without assambler. So my tought process is following: The code I was ...
5
votes
3answers
972 views

Difference between internal and external oscillator for a microcontroller?

I am a beginner with respect to microcontrollers, so I just want to ask is there two option for choosing the frequency of the microcontroller: to be internal or external? If there is internal ...
0
votes
0answers
23 views

Heater cooler control

I would like some sign posting to how I can produce a system. The components I have are so far, Fan control PWM based I think as I tried a variable voltage and the fan just didn't last more than 2 ...
1
vote
3answers
52 views

Maximum CPU Frequency of PIC24FJ256GA705 That I Can Get with 8MHz Crystal

I'm used to run PIC24 device family (e.g PIC24FJ256GB) at CPU freq 32MHz using the PLL. Recently I got to use PIC24FJ256GA705 on my new project and when I read the datasheet, I found out that the PLL ...
-2
votes
0answers
49 views

How to read data directly from lcd display [migrated]

Referring to post: LCD data read and show on computer It was not clear what the final code is. Could you post the code and schema again, and if possible, an explanation of how it works? My problem: ...
0
votes
1answer
70 views

Why does my AVR microcontroller not work without AVR DRAGON?

I have the most annoying problem I have ever come across. The company I worked have an embedded device of theirs and the main designer left the company. They told me to reprogramme the device with C ...
-1
votes
0answers
37 views

Microcontroller unit drawing power from a printer

I'm looking to have a microcontroller and several components perform a process external to the printer. However, I would like to draw power from the printer into our unit. I was wondering if this task ...
0
votes
1answer
48 views

Output impedance for microcontroller minimum 5kOhm

So I'm looking into the stm32f469 series of chips (datasheet here), and see if I can play good audio with one with the build in DAC. To my knowledge, the built-in ones on chips usually aren't that ...
-2
votes
0answers
51 views

How to Programm a PIC12F508 to light LEDs? [closed]

im new to programming and feel quite overwhelmed with googling it myself, i just have a simple project that i want to do and hope you can teach and show me the code i need. The plan is to have a ...
0
votes
1answer
49 views

How do I learn-by-practicing digital circuits - MIPS R2000 (or similar) processor or board? [closed]

I already do have a book which I am studying for a university course. I've searched online to buy a development kit for MIPS R2000 (or similar) and have been suggested the MIPS CI20. Don't know if or ...
1
vote
1answer
42 views

Doing logical operations on Port PINS in Assembly

I'm trying to do those following the operations on PINS, but not sure how to do the not operation on a port, do xor ..etc? would someone show me an excrept psesuod code ?
-1
votes
0answers
48 views

AVR Watchdog Disable Issue

I am using avr atmel 1284p microcontroller. I am using watchdog library "avr\wdt.h". ...
0
votes
1answer
45 views

i2c bus sniffing and spoofing

Some Background: I am working on an embedded c project for a samd21j18a MCU. The MCU communicates with 2 crypto eeproms on the i2c bus. All the data is encrypted with AES in CCM and additional ...
1
vote
2answers
61 views

Creating a vibration device based on bass in audio [on hold]

First, I'll admit that I haven't done any real electrical engineering in years so I'm quite rusty. But here's a fun project to contemplate: I'm building a device that "rumbles" with the bass in the ...
0
votes
1answer
42 views

Redundant system question

so in short. I am building a redundant system of multiple atmega micro controllers. The way it works is that they are all connected to a single bar, when the system is booted, the first micro ...
1
vote
0answers
28 views

I2C stuck on waiting for 8 cycles on DSPIC33ev128

I am new to I2C communication and after reading a number of tutorials on the protocol I attempted to interface a QMC5883L (Chinese Honeywell HMC5883L) to a Microchip DSpic 33ev128gm002 microcontroller ...
1
vote
0answers
17 views

Net Output current from two charge controllers producing different voltages connected in parallel to a battery bank [on hold]

I would like to know the effect of charging a 48 V battery bank from two solar charge controller sources (each charge controller is from a different manufacturer) whose outputs are connected in ...
1
vote
2answers
142 views

Multiplexing LEDs

I’m doing a 16X32 LED matrix system. Controls via a PIC micro controller. The whole circuit is operating from a 5V source. For easy understand I have drawn a single Row/column how my hardware is ...
0
votes
1answer
109 views

What are IC made of?

Is that black material made of silicon? What about the red, green, yellow material? What about the blue material?
0
votes
2answers
187 views

Is this CANbus wiring reasonable?

above is the wiring of my CANbus. D1 is where the sensor values are coming from the robot. D4 is the radio receiver for the remote controller of the robot. The problem that I have is, the CANbus 1 is ...
1
vote
0answers
19 views

TIVA Injection Current

I want to understand how the GPIO pins of my TIVA uC will behave when the voltage is above Vcc or below GND. I assumed I could just Ctrl+F "injection current" in the datasheet and that would give me "...
0
votes
2answers
73 views

How to drive a 1MHz Ultrasound-TD1000KA

I want to measure the Sediment of water. So I chose a 1MHz Ultrasonic Transducer sensor with the ability to work underwater and also can recognize the sediment under water. The output of the sensor ...
4
votes
1answer
102 views

Using a zener diode and a bjt to regulate voltage received by a controller

Okay, here goes… I’m trying to create a circuit that will prevent low conductance (from rain water exposure) which occasionally shorts a particular switch, from triggering a controller input that the ...
1
vote
1answer
44 views

Accurate localization of a remote vehicle

I've been working on a project where I'm supposed to design a vehicle that carries antennas to perform SAR (Synthetic-aperture radar) imaging. This vehicle has 3 wheels which 2 of them steered by a DC ...
1
vote
2answers
64 views

Why there is a voltage drop while connect multiple 12 V or 24 V solenoid valve with a 24 V DC adapter

I am doing a water plant project. I need to control multiple solenoid valves with my micro controller circuit using relays. When I connect more than 4 solenoid valves (12 V) with a 15 V adapter it ...
0
votes
0answers
29 views

STM32H7 Camera and LCD display

I am using an STM32H7 and I am trying to interface a camera module(Ov7670) to it as well as an LCD display to display the output of the camera. I have connected the camera to the MCU using DCMI + I2C....
-1
votes
1answer
45 views

CANopen CANmessage blocking

Is there a trick to block CAN messages from a specific device? I have to block some of CAN messages of my remote controller so that I can send my CAN messages via my Laptop. Otherwise my messages gets ...
0
votes
1answer
42 views

Slow clock speed with Atmega328P AVR microcontroller on breadboard

I have a small breadboard with an Atmega328p 28 pin microcontroller with a 16 MHz crystal and two 20 pF capacitors on it (similar to this demo: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard). ...
1
vote
0answers
72 views

strange array values (C, psoc, usbuart)

I am still fairly new to programming, so I'm sorry in advance if my terminology/formatting isn't up to scratch. I am currently working on an element of a musical instrument that will allow me to ...
1
vote
1answer
59 views

AVR - strange communication between ATmega8A and bluetooth module

I'm using ATmega8A-PU AVR microcontroller, and HC-05 bluetooth module on a breadboard. What I'm doing here, is to connect to BT module from my mobile phone and toggle the LED state by sending ...
-1
votes
1answer
78 views

How to implement coulomb counter method for battery capacity using any micro-controller? [closed]

I trying to implement coulomb counter method in any micro-controller. suggest me, any circuit ? Or Any give idea how to implement?