Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

How to make a circuit which can give divided voltage to ADC and can send a trigger pulse to INT0 when I press a button?

I connected 4 buttons to the ADC module of AVR-ATMega328p with different resistor values, To know which button is pressed this ...
in.yssh's user avatar
  • 45
0 votes
1 answer
2k views

ADC Multiple Channel without using DMA

below i give my code. here i using 2 ADC Channel and i getting first ADC channel value only. i need to read both ADC channel value. ...
Sudhakar R's user avatar
2 votes
1 answer
137 views

Triggering ADC conversions with a timer on the MSP430FR5969

I am trying to repeatedly sample one channel from the ADC on my MSP430FR5969 using timer TA0. Unfortunately, the timer doesn't appear to be causing conversions. I expect my issue lies in my ...
Rohan Menon's user avatar
0 votes
2 answers
2k views

STM32 interrupt and input on same pin

Fairly simple question but I couldn't find any instructions on this. I'm using an STM32G070 I'm interfacing with an ADS1231 which uses DOUT / ~DRDY on the same pin, and I'm wondering if there is a way ...
zozwold's user avatar
  • 90
0 votes
1 answer
75 views

Problem or misunderstand of ADATE bit on ATTiny45

I have 2 buttons connected to pulled-down ADC input. I want to trigger ISR(SIG_ADC) when ADC finishes conversion - this is working. If I start ADC using ...
filimonic's user avatar
  • 209
0 votes
1 answer
3k views

What if you enable both DMA and Interrupt for a STM32 ADC

Imagine this scenario: You are using a timer driven ADC in DMA mode, nothing special. Now, because you are interested in having a Watchdog, you also enable the ADC Global Interrupt in CubeIDE (...
sauz's user avatar
  • 61
1 vote
1 answer
4k views

STM32: Why can't I use scan mode in interrupt-driven ADC?

I'm using an STM32F103C8 to read 3 ADC channels, and have used CubeMX + HAL to configure the ADC to shuttle the ADC values into a buffer. I've been able to accomplish this with DMA and polling: I've ...
concat's user avatar
  • 131
0 votes
1 answer
118 views

Problem with ADC configuration - atmega328p

What's up folks? I've been developing a project using atmega328p and avr-gcc. Recently, I've tried to configure the ADC to single sample. The codes below show my main.c, ADC.c and ADC.h ...
André Machoski's user avatar
1 vote
1 answer
970 views

ESP32: sampling a 1 kHz square wave (10%-90% duty cycle) with analogRead()

I need to sample the peak voltage of a 1 kHz square wave. The duty cycle varies between 10% and 90%. I am using an ESP32 and hoped to use analogRead() to sample the ...
Matthew Goulart's user avatar
1 vote
0 answers
198 views

STM32F042 ADC Interrupt with STMCUBEMX

I need to read 15 channels ADC. However my MCU is specific named STM32F042K6T6. I decided to use an analog MUX to read every channel from just one pin. But, I didn't read accurately the datas by ...
ber2bingol's user avatar
0 votes
0 answers
73 views

Big code in interrupt freezes main function

I'm writing firmware for an ATSAM4S (runs at 120 MHz)and I noticed a strange issue with ADC interrupt handler. I set up ADC at 20 MHz, 5 enabled channels, and DMA transfer complete interrupt. ...
MrBit's user avatar
  • 2,074
0 votes
1 answer
486 views

STM32F411VE ADC interrupt not working

My code works fine without interrupt (I tried polling the ADC value) but when I enabled the interrupt, it didn't work - while debugging in Keil, it never reaches the ...
Mourad's user avatar
  • 355
4 votes
2 answers
1k views

Set up an ADC ISR, but every time an ADC Interrupt is called it goes to isr_trap.asm instead

I am trying to do a program with my MSP430FR6989 from Texas Instruments. I send an Analogue signal to my ADC module in the uC, which converts it to a digital signal. If the value is greater than 0x800 ...
Embedded_Dude's user avatar
1 vote
0 answers
479 views

MSP430G2553 Reading from ADC10 Temperature with Button ISR

This is my lab assignment. When I press the button, the red LED toggles on and off. But, I can't seem to read anything from it. Also, there's an empty loop in the code, but I don't know what to insert ...
SpesifikBrush's user avatar
1 vote
1 answer
929 views

ADC Interrupt usage

I'm using a dsPIC30F4011 in my project with XC16, and I'm currently programming its ADC. But my question is also general: Do I have to turn off and then back on the peripheral (ADC in this case) in ...
Iaka Noe's user avatar
  • 185
1 vote
2 answers
6k views

Arduino Atmega328 sleep mode with internal timer interrupt

I am trying to reduce the current consumption of my Atmega328 -Arduino- by using the sleep modes. In my code, I want to wake-up every 10ms, read the value from ADC, ...
Farzad's user avatar
  • 11
1 vote
2 answers
1k views

ATMega328P free-running ADC interrupt not firing

I'm playing with an ATMega328P running off a USBtiny 1.0, and have the following set up: Potentiometer to ADC0. PB0 sourcing current for a LED. My program then mirrors ADC0 to the PWM on PB0, so the ...
jameswilddev's user avatar
0 votes
1 answer
58 views

How to change the reading from an ADC of 10 bits to the timer 0 registers using a PIC18f4550?

I a reading an anlogue value using the 10 bits ADC from the Channel 0. I have implemented an interruption using timer 0, where I set some value for the registers of timer 0 (TMR0H and TMR0L - 8 bits) ...
Mac's user avatar
  • 23
0 votes
1 answer
10k views

ADC continuous conversion STM32F103

I'm facing with a problem regarding continuous acquisition of ADC channel in STM32F103. I use the interrupt at the end of conversion to call a callback function to store the acquired value. The ...
Federico's user avatar
  • 145
1 vote
1 answer
3k views

stm32 freezes during ADC

I am doing simple ADC test with potentiometer on STM32F103C8, it seems to work fine for 5 seconds or so, but then the whole uC just stops - even while loop stops doing what it is supposed to do(so I ...
ScienceSamovar's user avatar
1 vote
1 answer
2k views

Testing the ADC interrupt on dsPIC33EP256MC506

I have a Microchip MCLV-2 development board intended for controlling small rating BLDC and PMSM. I am trying to develop a simple program to test the ADC interrupt. Basically, I want the program to ...
Adeel's user avatar
  • 167
0 votes
1 answer
2k views

AVR Atmega8 USART and ADC and PWM

I have created 2 different PWMs using timer 1 and 2 on ATmega8, that is used to control a linear motor. I'm using a hall effect sensor to detect changes in voltage as the linear motor moves left and ...
subz's user avatar
  • 623
4 votes
3 answers
7k views

AVR ADC performance: interrupts vs. manual conversion

I have a device on ATMega16 microcontroller that is supposed to constantly send ADC measurement results over USART. The controller is operating at 16MHz with an external crystal and ADC prescaler is ...
Ashton H.'s user avatar
  • 811
4 votes
4 answers
2k views

Does an external interrupt interrupt ADC or does ADC stall interrupt?

I'm working on an RTC application with a 1Hz clock attached to the external interrupt pin on a PIC16f887. I also have continuous ADC operations happening along with the 1Hz clock. My question is ...
Shubham's user avatar
  • 6,234