Search Engine

24 Threads found on Interrupts Mikroc
I am using mikroc PRO PIC32. I have to implement Active CAN Fault Analysis Algorithm mentioned in page no. 455 of attached PDF. Do I need to write a CAN Code or Can I just use Timer and External interrupts to implement it ? Ok. Shall I use CAN with Timer Interrupt to make the Analysis tool that is to implement the Active Analysis Algorithm in
Hello, I need help. PIC USED 18F46J50 Compiler mikroc PRO Set RX2 and TX2 in the RP0 RP1. Puertos TX1 and RX1 occupied. code used { RCSTA2.SPEN=1; // activate USART2 TRISA.F0=1; //RX2 Input TRISA.F1=0; //TX2 Output INTCON.GIE=0; // disable interrupts EECON2=0X55; // EECON2=0XAA; PPSCON.I
A would like to generate interrupts every 250ms with Timer1, but I get interrupts with more than 1 sec using the code below (I am writing it in mikroc PRO for PIC). I set frequency to 8MHz with internal oscillator. What is the problem? Thank you for helping. void InitTimer1(){ T1CON = 0x31; TMR1IF_bit = 0; TMR1H = 0x0B;
Tey attached project. There are two versions. One without external interrupts and one with external interrupt.
I am using ATMEGA16 and mikroc PRO AVR compiler. I need to know why serial reception using interrupts is not working. The UART transmit is working fine. // LCD module connections sbit LCD_RS at PORTB2_bit; sbit LCD_EN at PORTB3_bit; sbit LCD_D4 at PORTB4_bit; sbit LCD_D5 at PORTB5_bit; sbit LCD_D6 at PORTB6_bit; sbit LCD_D7 a
Hi, I am using mikroc Pro for pic. pic18f4550. And know I connected 2 projects in one project. DS18S20 thermometers and RTC. But know program is running very slow. If DS18S20 is working RTC not. I find out I need interrupts, but I am new in this and don't understant how use them, can anyone help? here is my source code: // osc 8MHz // mikr
if you are using interrupts, you can set this bit in the interrupt itself..
You should be able to implement a timer interrupt and ISR which can be configured to start an ADC every tenth of a second. An interrupt and ISR also can be used to store each conversion value upon completion. Effective use of interrupts and ISRs should allow the code to perform the required tasks on the ADC values in between handling the inte
use interrupts, you can count the pulses using RB0 int pin. increment your counter in the interrupt routine. unsigned short counter; // Define variable cnt void interrupt() { if(portB.F1 == 1) counter++; } void main() { INTCON.GIE = 1; // this enables all interrupt INTCON.INTE = 1; //this will enable RB0 interrupt //put your displa
after u write u gotta provide some delay before u enable interrupts again . if using mikroc consider this an example . char MODE_TIME={0,0,0} void EEPROM_upload_() { char data_write=0; for(data_write=0;data_write<=2;data_write++) { switch(data_write+1) { case 1:EEPROM_Write(base_add_EEPROM+data_write,MODE_
Hi, If i were you, first build simple zero cross cct like in this, then feed the outputs of the detectors to gpios and measure the time between two rising edges. Many micros has port change or edge triggered interrupts. To measure time you can use timers.
hello, Your probleme is not interrupt treatment, PIC allready must use interrupts in UART functions, you have to define a protocol for exchanging data between your 2 devices. What can of data your are transmitting.. Raw data (binary data) or ascii data ? simplest protocole can be use if ascii data ENQ ACK NACK ... response to define which will
Hello! My Circuit Consists of a PIC16F877A. Pins RB0, RB1, RB2, RB3, RB4 is configured as active high inputs. Port D0 is configured as output and is connected to a led. Port C (pins C0 to C6) is connected to lcd. I need mikroBasic or mikroc code which uses interrupts to handle the button clicks. The program should display some text (on lcd) depend
I would recommend implementing a timer interrupt to handle the sampling interval and possibly a external interrupt to handle the keyboard entry. Study the mikroc manual concerning interrupts and experiment with a few timer interrupts for practice. BigDog
Here's examples of interrupt and timer use: PIC interrupts - Part 1 PIC16F877 Timer Modules
Hi Im really new at this so very thankful for any help. Im using a pic16f877 and want to use a 4x3 keyboard. I understand that mikroc has a library to handle keyboards (interrupts) but it is made for 4x4 types. The example that microc has in it's example folder is also a 4x4. They use this line to define the module: // Keypad module conn
I m doing a PID tuning. First I defined constant error and try to tune the PID. I input the angle of 40 degrees and got the difference between encoder reading angle and 40 degrees as error in my program. I want to ensure my encorder pulses reading is correct or not, and if not please help me. I used RB4-7 interrupts. I use mikroc language, PI
Experts, I am not getting interrupts working. From the data sheet, I have set out the values for bits but doesnt work. I can use it a a simple input port but not with interrupts. kindly help me out. here is a simple test code I wrote, int count=0; void interrupt() // Interrupt function definition {
I am using a PIC18F24K20 and would like to know how to set up Timer1 and the interrupts. Does someone have an example I can work from?
You just need to write a function called interrupt. If you are going to use priority levels on interrupts, high priority interrupt service routines are described in void interrupts(void) function, and low level interrupts are described in void interrupts_low(void) function. To check for the correct (...)