3
votes
1answer
70 views

PIC interrupt based soft UART timing trouble

I've tried to implement a software UART on a PIC18F452 using TIMER0 interrupts and I can't get the timing working. I'm using MPLAB ASM for compilation and the PICkit2 for programming. ...
2
votes
2answers
117 views

PIC18 USART Interrupt for reception, doesn't trigger

I have set up the Enhanced USART module for a PIC18F4331 and have been trying to do a loop test. I am using MPLABX, programming in XC8, using Pickit3 for debugging and monitoring serial pins with an ...
3
votes
4answers
262 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: ...
2
votes
1answer
79 views

Would a high priority interrupt interrupt another high priority interrupt?

In the datasheet of the 18F4620 and others, section 9.0 (page 91), I read: The PIC18F2525/2620/4525/4620 devices have multiple interrupt sources and an interrupt priority feature that allows most ...
0
votes
0answers
109 views

Simple PIC18 USART Interrupt not working

Edit So talking to the duck and some more searching here seems to have solved it. On power on and reset, ports are set to be analog. I now disable this in my setup. It was a problem between this ...
3
votes
3answers
170 views

PIC - Time to enter the interrupt

I am using the PIC18F2550 and I wanted to know how much time takes between an event happens (e.g. ADIF)and the interrupt routine starts. In other words, how much time the "interrupt system" takes to ...
5
votes
1answer
416 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 ...
1
vote
1answer
39 views

DSPIC30f timer1 not trigger everytime on POR

I am using timer1 on DSPIC30f4011 to generate an interrupt every one millisecond. However, the timer1 ISR is not executed every time on POR (2 out of 10 times). If I turn on the power for the chip and ...
5
votes
2answers
677 views

Using multiple external interrupts in PIC

I've used PIC16F877 (datasheet) for several projects. For a single external pin change interrupts, you can use PORTB0 interrupt. ...
5
votes
2answers
229 views

Need help understanding Ultra Low Power Wakeup on PIC16F887

I am trying to implement the "Ultra Low Power Wake Up" feature on a small PIC project. The idea is the chip will go to sleep, and then be woken up in the future by the ULPWU interrupt. The idea ...
2
votes
1answer
222 views

How does writing to output pins on PORTB affect RBIF interrupt on PIC16F877

I have a PIC16f877 with PORTB configured as follows: RB0 Output RB1 Output RB2 Output RB3 Output RB4 Input RB5 Input RB6 Output RB7 Output RB4..5 are used for ...
0
votes
2answers
577 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 ...
4
votes
5answers
678 views

What is the difference between Interrupt on Change and External Interrupt on PICs

What is the difference in function between IOC and EXT Interrupt on a PIC? I am currently using a PIC12F1822, and apart from the extra layer of checking you have to do with IOC (i.e. which pin caused ...
4
votes
4answers
426 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 ...
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 ...
1
vote
0answers
401 views

PIC32 SPI ISR not being called when RXIF flag set?

I'm using a PIC32MX795F512L SPI3 module in slave mode. My master is sending data over the SPI line but my slave's interrupt service routine is never being called. The RX interrupt flag is being set ...
1
vote
1answer
442 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 ...
4
votes
1answer
726 views

PORTB Interrupt On Change changes state unintentionally

I am running below code in a PIC16F887 that runs at 20 MHz. I feed PORTB.0 a signal of 1 KHz from my signal generator. However, whenever the signal is low, ...
0
votes
3answers
2k views

Interrupts with 16f887 and MPLAB

need some help with interrupts and the 16f887. I'm using MPLAB and writing my code in C. I am using the 44-pin demo board from Microchip. There is a push button wired to RBO/INTO which is normally ...
2
votes
1answer
3k views

Interrupt handling for a UART on PIC32 with C32 v2.00 compiler

I am very new to PIC32 chips (or any PIC chips) and I am trying to create an interrupts handler for the UART to be called when the UART receive a byte. I am using the PIC32MX695F512L PIC32 processor ...
3
votes
1answer
755 views

dsPIC33, SPI slave, and Timer1 interrupts. What happens?

I have an interesting problem with the dsPIC33FJ128GP802. I have it configured as a slave SPI device connected to an Arduino acting as the master. Timer1 is set up to trigger an interrupt at ...
1
vote
1answer
324 views

I having troubling understand what other interrupt firing besides TMR2 on PIC18f4550

I having troubling understand what other interrupt firing high_isr besides TMR2 on PIC18f4550. Way I detect it I set pin MY_DBG_PIN toggling everytime high_isr is activated, and from what I try to ...
0
votes
2answers
1k views

PIC interrupt delay_ms

I'm using MikroC Pro, PIC16F1824 with XTAL 4Mhz. Basically I have 2 mode of LEDs. I use serial cable to send which mode to play. Mode 1 = On for 3 seconds and Off for 3 seconds. Mode 2 = On for 1 ...
1
vote
1answer
290 views

Writing to timer counter while timer is running

I'm using PIC16F1947 for a project. The project requires real time tracking so a stable 32768 Hz crystal is connected with the Timer1 oscillator. The Timer1 oscillator circuit and the crystal will ...
4
votes
3answers
732 views

Stepper Motor Control Timing

I have a question regarding stepper motor control while using the TCP/IP stack. In the past I have used a timer for my stepper motor control. I set the period of a timer to the required time between ...
2
votes
2answers
627 views

What is the ISR for the comparator change interrupt on a dsPIC33F?

As seen on Meta. I'm asking for the ISR name for the comparator interrupt for a dsPIC33F. I've tried _CompInterrupt, _CMInterrupt and _CMPInterrupt. All three bring up warnings about non-existent ISR ...
2
votes
1answer
692 views

Increasing the delay using 'option' register in Pic16f877a

I have learned that the maximum 'delay' possible in pic16f877a running with a source of 11.0592MHz (11059200 / 4 actually) is 23 ms.. without using software delays (delay_ms( )).. the calculation was ...
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: ...