Find Jobs
Hire Freelancers

fix interrupt in AVR

$10-30 USD

Suljettu
Julkaistu lähes 7 vuotta sitten

$10-30 USD

Maksettu toimituksen yhteydessä
I made this circuit: [login to view URL] And this code: [login to view URL] There's a led in PB1 and a button in PB3. When the button is pressed, PB3 pin change its state from high level to low level, this produces an external interrupt. The code of this interrupt, makes the led turn on for 100ms. But this code, turn ON the led everytime the button is pressed/released, that means everytime PB3 change its state. TASK: I want the led to be turned ON, just when the button is released. (Make this by using interruptions)
Projektin tunnus (ID): 14065391

Tietoa projektista

21 ehdotukset
Etäprojekti
Aktiivinen 7 vuotta sitten

Haluatko ansaita rahaa?

Freelancerin tarjouskilpailun edut

Aseta budjettisi ja aikataulu
Saa maksu työstäsi
Kuvaile ehdotustasi
Rekisteröinti ja töihin tarjoaminen on ilmaista
21 freelancerit tarjoavat keskimäärin $25 USD tätä projektia
Käyttäjän avatar
Hello Dear, I am an expert with more than 15 years of experience in the field of embedded systems, electronics and programming. I have all the development tools and hardware to develop the solution. Regards Ch
$50 USD 3 päivässä
4,6 (40 arvostelua)
5,9
5,9
Käyttäjän avatar
FREELANCER RECOMMENDED ------------------------------------------------------ Can help... I am an Expert... Lets Start! Please start a Discussion with me and we can get started from there... Please check the past projects I have handled and check my reviews for what employers have to say about my work... Can start right now...
$25 USD 1 päivässä
5,0 (6 arvostelua)
4,9
4,9
Käyttäjän avatar
Hi, You can easily check for the pin (PB3) value in the ISR and if it is high so it is rising edge. Best Regards, Ahmed
$25 USD 1 päivässä
4,9 (11 arvostelua)
5,0
5,0
Käyttäjän avatar
dear Sir i can do this project. I can assure you that if you work with me once, you will always work with me for these kind of projects.
$25 USD 1 päivässä
5,0 (11 arvostelua)
4,1
4,1
Käyttäjän avatar
hi, solution change this line MCUCR &= ~(1<<ISC01) | ~(1<<ISC00); // Trigger INT0 on rising edge to MCUCR &= ~(1<<ISC01) | ~(0<<ISC00); // Trigger INT0 on rising edge let me know
$25 USD 1 päivässä
5,0 (5 arvostelua)
3,8
3,8
Käyttäjän avatar
buenas, tener delay en el ISR es mala idea, la mejor opción es usar una variable para detectar el cambio y hacer el resto en otra parte del código... incluyendo el filtro para el botón. Puedo solucionar el problema y entregar el código. un saludo, Gabriel
$30 USD 0 päivässä
5,0 (4 arvostelua)
3,7
3,7
Käyttäjän avatar
A proposal has not yet been provided
$30 USD 1 päivässä
5,0 (5 arvostelua)
2,7
2,7
Käyttäjän avatar
Hi there. Having worked with Atmel AVR controllers quite a lot, I feel like this feature will be quite simple to implement and I will ideally provide the completed program in under a day. Please feel free to contact me for further details about my skills and qualifications. Thank you.
$25 USD 1 päivässä
5,0 (1 arvostelu)
2,3
2,3
Käyttäjän avatar
I can do it for you; just need to re-config interrupt , and modified the code Thanks
$25 USD 3 päivässä
5,0 (1 arvostelu)
2,3
2,3
Käyttäjän avatar
Try this. This will power on LED when releasing the button, as you specified. Best regards. #define F_CPU 9600000UL #define FALLING 1 #define RISING 2 #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> char edge = FALLING; ISR(PCINT0_vect) { if (edge == FALLING) { edge = RISING; _delay_ms(50); // Remove button debounce MCUCR &= (1<<ISC01) | (1<<ISC00); // Rising edge } else { edge = FALLING; PORTB |= (1<<PB1); _delay_ms(100); PORTB &= ~(1<<PB1); _delay_ms(100); MCUCR &= (1<<ISC01) & ~(1<<ISC00); // Falling edge } } void SystemInit(void) { MCUCR &= (1<<ISC01) & ~(1<<ISC00); // Falling edge //MCUCR &= ~(1<<ISC01) | ~(1<<ISC00); // Trigger INT0 on rising edge PCMSK |= (1<<PCINT3); // pin change mask: listen to portb, pin PB3 GIMSK |= (1<<PCIE); // enable PCINT interrupt sei(); // enable all interrupts } int main(void) { DDRB |= (1<<PB1); DDRB &= ~(1<<PB3); PORTB |= (1<<PB3); //Enable Pushbutton pull-up SystemInit(); while (1) { } }
$15 USD 1 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
A proposal has not yet been provided
$35 USD 10 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
Hello! My name is Jackie. Currently, I am working as an embedded programmer. I have joined many projects to program firmware for micro controller. I am good at C/C++ and have a lot of experience of working with AVR. I make sure to finish your project well. Do not hesitate to contact me.
$30 USD 1 päivässä
0,0 (1 arvostelu)
0,0
0,0
Käyttäjän avatar
A proposal has not yet been provided
$15 USD 1 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
Hello, We are a team of embedded hardware and software professionals with experience in microcontroller based projects. Would like to know more about the project. Looking forward to work on this project. Please feel free to contact us for any further discussions. Thanks and Regards Techoviz
$20 USD 3 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
hello i used some AVR products in my projects and i would like to help you with your task best regards Gehad
$10 USD 0 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
I'm working for Active-Semi Company. I have 2 years experiment in embedded software. Please choose me :)
$10 USD 1 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
In your schematic button is not placed on INT0. I have working sample for your schem. Any other changes?
$10 USD 1 päivässä
0,0 (0 arvostelua)
0,0
0,0
Käyttäjän avatar
Hi, I am experienced embedded systems designer and have been using AVR's for a long time and would love to work on this project. regards,
$25 USD 1 päivässä
0,0 (0 arvostelua)
0,0
0,0

Tietoja asiakkaasta

Maan SPAIN lippu
Porto, Spain
5,0
6
Maksutapa vahvistettu
Liittynyt jouluk. 8, 2013

Asiakkaan vahvistus

Kiitos! Olemme lähettäneet sinulle sähköpostitse linkin, jolla voit lunastaa ilmaisen krediittisi.
Jotain meni pieleen lähetettäessä sähköpostiasi. Yritä uudelleen.
Rekisteröitynyttä käyttäjää Ilmoitettua työtä yhteensä
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ladataan esikatselua
Lupa myönnetty Geolocation.
Kirjautumisistuntosi on vanhentunut ja sinut on kirjattu ulos. Kirjaudu uudelleen sisään.