Tagged Questions
2
votes
2answers
136 views
Understanding volatile class fields in AVR C++ programs
I'm having some confusion about what members to declare volatile in a program I'm writing in C++ for an AVR microcontroller, with interrupts. When it's plain C it makes sense - the compiler doesn't ...
3
votes
4answers
261 views
Implementing an I2C buffer in C
I'm implementing a read-only I2C slave on a PIC18F4620. I have made a -working- ISR handler for the MSSP module:
...
1
vote
2answers
65 views
Function called in ISR and Overlay Directive -Keil / 8051 core
My C code has an ISR, where a decision has to be made to execute a particular function "A". Now I know that its not good to run a function in an ISR. But in this case of my application, I do not see ...
5
votes
1answer
415 views
Interrupt Service Routine in C - function at specific address
I need to add an Interrupt Service Routine (ISR) to existing code in C for a PIC18F4620 and a PIC18F46K22. As you can see in section 9 (of both datasheets), these devices have multiple interrupt ...
2
votes
1answer
185 views
Timer overflow on MSP430
I'm using an interrupt to wake the microcontroller once the value has been reached. I see that in the Capture/Compare Control Register there is a Capture Overflow bit. I can't seem to find an example ...
0
votes
2answers
574 views
PIC: Global variable not modified inside interrupt handler
I have an interrupt handler for my PIC 16 that should modify a global variable. The global variable is then read by main() in an infinite loop.
For some reason, it ...
6
votes
1answer
260 views
Time Base ISR Concurrency
This is sort of a "classic" problem, and I think I have a solution, but I want to vet it with this community. I am building a project using the ATtiny88 microcontroller, and I'm programming in ...
3
votes
2answers
320 views
Can't set to Fast PWM OCRA mode
Trying to have Fast PWM mode when TOP == ORCA.
Works fine with OCA toggle (measuring correct frequency), but doesn't work in ...
2
votes
1answer
810 views
How to use interrupts in micro C
I am making a robot which can follow lines, avoid obsercals and follow arrows. I wrote code for line following and arrow following but I don't know how to implement interrupts with more than two ...
4
votes
2answers
547 views
Define callbacks for interrupts
I am working with an STM32 and I am a bit confused about interrupts, specifically the Nested Vectored Interrupts (NVI). As I understand there is a NVI vector (called NVIC) where each interrupt has a ...
1
vote
1answer
441 views
Timer1 not running on PIC16F628
I have this little project that requires exact clock so I'm using 32768 Hz quartz on RB6 & RB7 on my PIC16F628. Both pins are grounded using 33 pF capacitors.
My code that configures the timer1 ...
5
votes
2answers
687 views
Teensy USB Interrupts
I'm trying to learn about interrupts using one of the Teensy USB boards. It's got an AVR AT90USB1286 chip on it. I'm using the code below, and I'm expecting my ISR block to get called and periodically ...
3
votes
5answers
1k views
USART transmit problems on a PIC
I'm trying to send data to an SD card from a PIC18f4580, but the PIC is not sending what it should be.
related global variables:
...