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
0answers
29 views

Pin should be lock for sample A warning in Pic

In an ADC i'm trying to configure for a pic PIC 32MX470F512LT its giving me a warning, that like the title says, it's that the pin should be locked for sample A. I ...
0
votes
0answers
31 views

MicroSD card SPI initialization irregularities

I've implemented the start-up sequence for SPI mode on MicroSD v2 cards (using the specifications), and I've found that the SD card fails initialization at different points in the process. It often ...
0
votes
2answers
101 views

Measure voltage on 48 batteries at once using microcontroller

I am looking to design a microcontroller that can measure the voltages on 48 batteries. Some of the batteries will have floating voltages as the device is wired in a parallel string of 8 columns, with ...
0
votes
0answers
41 views

The interrupt callback happens at the calculated period of the timer in pic?

I'm trying to set the timer of a PIC32MX470F512LT to happens every 8us. But after seeing on an oscilloscope when the callback of the timer it doesn't seem to ...
2
votes
0answers
41 views

How to upload code to AtMega2560 using JTAG ICE 2.0

Background : I'm used to code in Arduino(Uno, Mega, Esp32, Esp8266). But this time i have to code directly on AVR Atmega 2560 Chip. I have AVR JTAG ICE 2.0 (like this one) and download several ...
0
votes
0answers
71 views

Is there a minimum frequency in PIC32MX470F512L?

I'm still an inexpirient and I'm configuring the PIC, through MCC (Microship Code Configurator) So i set in the MCC a TMR1: The configuration for the ...
2
votes
1answer
158 views

How to measure high DC voltage by micro-controller with an integrated approach?

Goal is to measure DC voltages in the 100-500VDC range, safely with a microcontroller (e.g. Arduino) The particular application is to monitor the voltage of a large Lithium series parallel battery ...
1
vote
0answers
29 views

How do you get the call ringing response after sending ATD from gsm module?

I have a gsm module. I want to know which AT command can tell me if the target phone is ringing or not. I want to count time between start of ringing and user response Example: atd12345 ...
1
vote
0answers
51 views

MIT vs GNU licences for Embedded system projects [migrated]

For embedded system projects which have small hardware using MCU's and sensors and use open source c-source codes. How will it make a difference if my license is an MIT or a GNU licenses?
0
votes
1answer
39 views

Small Vacuum pump driving circuit

Please take this vacuum pump datasheet for the circuit I am planing to build. Vacuum pump datasheet I like to make a simple motor driver preferably using an SMD type MOSFET. I am struggling to ...
0
votes
3answers
84 views

Connecting a 5 V signal to a 3 V tolerant pin of a PIC

I have a situation that happened in my case, where i'm putting an AC signal that goes from 0 to about 4,5 V in a 3 V tolerant pin of a PIC. The pin in question is ...
0
votes
1answer
66 views

Interfacing a microcontroller digital IO

I'm working with some microcontrollers, and I'm quite confused about how to interface the digital I/O. I've already see some projects with opto-couplers on outputs, other ones with buffers, so I'm ...
0
votes
0answers
30 views

Routing extra IO traces across MCU IC without crossing USB lines

I'm currently designing a PCB using an STM32L433CB LQFP48 chip. The design uses the USB connection to communicate with an external PC. USB is configured to Full Speed (internal pull-up on D+ line) and ...
0
votes
1answer
42 views

Will the choice of prescaler and period while configuring a timer influence the MCU load and power consumption?

Let us say we want to configure a 16-bit timer to generate an interrupt every 1 second with a clock running at 8 MHz. We can use several pair of values for the period and prescaler. Let us take the ...
0
votes
0answers
42 views

micro controller cant able to sense analog value (ADC input) from op amp output

I am trying to sense the current in my motor controller using shunt resistor and an op amp. Opp amp amplifies the voltage drop of the shunt resistor, multi meter shows the output voltage good. But ...
2
votes
3answers
154 views

Bare minimum FreeRTOS

My only requirement is time triggered cooperative scheduler. I heard they are more reliable and predictable. If I want to use only the 'cooperative scheduler' of FreeRTOS for STM32F103 then is it ...
0
votes
1answer
42 views

Relating RAM usage with stack allocation and random resets in a microcontroller

This might appear to be too much data way too scattered to understand, but I'll make a genuine effort to explain. Controller: R5F111MJ (ROM 256KB, RAM 16KB), RL-78/L1C family. Datasheet can be found ...
0
votes
1answer
60 views

PLC writing Software [closed]

I wanted to create my own PLC and PLC supporting software. I would like to know how to get started. Is there any software available to create background software? What is a recommended ...
1
vote
1answer
24 views

RCC clock freq in STM32F103

If I select internal clock source to run my TIM3 in TM32F103 (TIMxCLK from RCC) as shown in the attached picture: CK_INT Then how to find out what is the freq of this clock? I am using External ...
0
votes
0answers
75 views

In C both static local variable and static global variable memory allocation [migrated]

In C both static local variable and static global variable with same name declaration are done in same file. They both are stored in data segment memory. When I compile code why it is not throwing ...
11
votes
1answer
359 views

Understanding STM32 datasheet regarding decoupling capacitors

I'm trying to understand what ST recommends for decoupling caps for STM32F030CC. The diagram in the datasheet shows "2x100 nF" caps on the Vdd/Vss pairs. Does this mean 2 parallel 100nF caps per Vdd/...
0
votes
2answers
101 views

How can I safely drive a relay OR sense a switch from a single terminal?

I am designing a device that uses an MCP23017 running at 3.3V to either check a "port" on a terminal strip as an input from a motion sensor or drive a relay/SCR/indicator from the same "port". I'm ...
0
votes
0answers
19 views

How do I show a four wire servo motor in Proteus?

I have a four wire servo motor which I am interfacing with my micro-controller. I use the feedback wire to know the angle or position that my servo arm is at. The standard way of interfacing a three ...
0
votes
0answers
37 views

STM32F103 USB-CDC does not work

I am trying to communicate my Maple Mini clone board with PC without using a USART hardware. I've configured MCU with STM32Cube IDE which has STM32CubeMX in it. I've enabled USB hardware, set it to FS,...
0
votes
1answer
50 views

Measuring Energy (Watt-hour) from Microcontroller

I have microcontroller device (ESP32) that doing some process and the begin to sleep. This cycle is for 12 hours (00:00-12:00). And after that, begin full sleep for 12 hours (12:00-00:00). So my ...
3
votes
2answers
190 views

How to convert block diagram in to circuit schematics [closed]

I want to design an electrical circuit for my project. l am not good at making circuit schematic, but I am good at assembling block diagrams. How can I convert a block diagram into a circuit ...
0
votes
1answer
49 views

stm32 drawing current from 40 outputs at the same time

I have an hardware question about stm32 family. I am designing a circuit with STM32F103VB. datasheet mentions that i can draw up to 25 mA current per pin(page 37 table 7). I need to drive 40 npn ...
1
vote
3answers
112 views

int functions with no return statement

In a course I am taking on embedded systems, I program LPC1768s which are based on ARM using C. The main functions are always of int return type. However, there ...
0
votes
2answers
49 views

USB LPT Converter by FT232R

I am really green and even greener in these topics, but i am trying to create a project which will be converting lpt signal to usb signal via FT232RL. I was searching a lot in internet and i have some ...
0
votes
3answers
45 views

Could an external circuit with 74HC series IC reliably test a 24 MHz crystal?

I made a circuit where the microcontroller works. I made a duplicate of the same circuit with a working micro, but that circuit does not start and there is no smoke and the PCB is clean (no loose ...
1
vote
0answers
46 views

How to properly implement I2C communication between two or more STM32s?

I have a master board with STM32F030R8 and two daughter boards with STM32F030C6. The objective is to communicate parameters between the boards periodically and also on-demand. With some effort I ...
2
votes
4answers
74 views

Handling brownouts during external flash writes

What techniques should be applied for writing flash in systems that have inherently unreliable power? Is there any good reading material on the subject? If I have a microcontroller writing sensor ...
-1
votes
1answer
41 views

Is it convenient to use a buck converter on a RS-422 communication board?

I am working on a PCB design with STM32 MCU. On the PCB there will be 2 MAX490 transceivers and one bluetooth module. Communication speed will be 921.6 Kbit/s for all communication elements. ...
0
votes
1answer
120 views

What could cause a microcontroller on a board not to accept programming?

EDIT: To summarise - when I take the microcontroller off the board, it works. But when I leave it on the board and try to program it, I cannot. I have designed a PCB and had it fabricated. This PCB ...
5
votes
3answers
870 views

What is a Power on Reset IC?

I'm making a prototype based on the W7500P reference design, the latest version (updated 6 months ago) specifies the need for a Power over Reset IC. I do not understand the point of this component ...
2
votes
1answer
116 views

CPU Utilization Methods

To fulfill customer expentations and fill out customer reports about the device, is there also one section about CPU Utilization. Because I have never done such task before I have overview some "...
0
votes
1answer
68 views

Storing values in the internal flash memory

I want to reserve a space in the internal flash memory of my microcontroller (STM32L4) to store the latest 100 measured values by a sensor (in a circular FIFO Fashion) and be able to load them again ...
3
votes
3answers
229 views

Using Arduino sensors with an STM32

I want to start an electronic project, and found that an ARM based MCU, like STM32F103C, fits my needs more than AVR like Arduino Uno (mostly because of CPU and RAM.) I was wondering if I can use ...
0
votes
1answer
75 views

Why do we need to continuously refresh a high resolution graphics LCD while we don't need the same for a character LCD?

It is very easy to interface an MCU with a character LCD (let say, 16x2, 20x2, 20x4, etc.) because we don't need to constantly refresh what is displayed. Once we send what we want to see, it is ...
1
vote
4answers
69 views

P-Channel MOSFET Flipped on Schematic

I'm designing a circuit which has a bluefruit nrf52832 micro controller built into it. When referencing the schematic provided by Adafruit I noticed that they had +VBAT going to the drain of the p-...
0
votes
0answers
50 views

Display sine wave on oscilloscope with avr atmega164

I want to display a sine wave on oscilloscope using AVR Atmega164, but when I put the oscilloscope on the pin OCR0A, it takes me an rectangular pulse. How can I display a sine wave? I will put my code ...
0
votes
1answer
78 views

How easily can a microcontroller be damaged by mishandling?

I bought my first microcontroller and a few shields for it, and they arrived yesterday. I was so excited about tinkering with them that I completely forgot about all safety precautions and think that ...
0
votes
1answer
38 views

Mosfet or bjt choice for low voltage joule thief application

I make solar energy harvester using joule thief circuit with a small solar cell as the input. The output voltage from the solar cell is 0,5V. But the generic transistor, exactly silicon material need ...
0
votes
2answers
59 views

what does the “UL” means when specifying the clock speed for AVR MCUs

So I am using the ATTiny10 for the first time, and I noticed that even after setting the clock pre-scaler register correctly (0x00 in my case) I had to define a value called ...
0
votes
0answers
19 views

Command from Openocd to deactive Target

Can someone tell me if there is a command from OpenOcd that we can deactivate/stop the Target for a while? (like when we press the reset button) I am flashing 4 devices in a daisy-chain with Jtag and ...
0
votes
0answers
50 views

How to allow input on bits of Microcontroller port

I'm trying to figure out this question: Write a line of code in C to allow input on bits 2 through 4 of port A. I am familiar with writing code, I just don't understand the question. Can someone ...
0
votes
1answer
45 views

5 V from power bank not constant when supply circuit

Now I'm working on my project which contains Arduino, LCD, electromagnetic lock, 6 channel 5v relay and 500V isolated converter. My project was designed to power by using a power bank. Now I use eloop ...
2
votes
1answer
34 views

Reading signal from 190v magnetic pickup

I am using a magnetic pickup to detect the phase and RPM of a rotating assembly. The magnetic pickup produces a pulse once per rotation when a ferrous interrupter passes the pickup. Dependent on the ...
8
votes
2answers
443 views

Why are logically related bit fields in MCU registers often in separate locations?

Forgive me if this question has already been answered, but I was unable to find an answer either on this page or in the wider Internet. I'm an experienced developer with decent knowledge regarding ...
2
votes
0answers
48 views

Address Sent bit is not set on STM32F4 Disco

I am trying to interface my STM32F4 Discovery board with a sensor that works over i2c, since the sensor required a specialized i2c protocol, I decided to implement my functions using registers. But ...