Search found 9 matches

by enryv
15 Aug 2012 09:46
Forum: mikroC PRO for PIC General
Topic: Button RB4 Interrupt
Replies: 8
Views: 4076

Re: Button RB4 Interrupt

Thanks Filip and Mario It works!!! This is the solution: unsigned int b=0; void interrupt(void){ if (INTCON.INTF == 1) { b=1; INTCON.INTF = 0; } }//end ISR void main() { ANSEL = 0; ANSELH = 0; C1ON_bit = 0; C2ON_bit = 0; TRISD = 0xF7; // Configure RD3 as output Sound_Init(&PORTD, 3); OPTION_REG = 0x...
by enryv
14 Aug 2012 19:13
Forum: mikroC PRO for PIC General
Topic: Button RB4 Interrupt
Replies: 8
Views: 4076

Re: Button RB4 Interrupt

Mario I have done as you have told me but it doesn't work..this is new version of code: unsigned int b=0; void interrupt() { if (INTCON.RBIF==1) { b=1; } INTCON.RBIF = 0; // clear flag } void main() { ANSEL = 0; // Configure AN pins as digital ANSELH = 0; C1ON_bit = 0; // Disable comparators C2ON_bi...
by enryv
14 Aug 2012 18:26
Forum: mikroC PRO for PIC General
Topic: Button RB4 Interrupt
Replies: 8
Views: 4076

Re: Button RB4 Interrupt

Thanks a lot Mario but i do this exercise to learn how use interrupt!!
I want that when i push RB4 button the pic executes the codes of interrupt (buzzer don’t play for 4 seconds).Thanks again
by enryv
14 Aug 2012 16:49
Forum: mikroC PRO for PIC General
Topic: Button RB4 Interrupt
Replies: 8
Views: 4076

Button RB4 Interrupt

Hi,..I'm writing a program in which buzzer play indefinitely and i want that buzzer don't play when the button RB4 is pressed. I'm using PIC16F887 and Easy Pic 5 board. It doesn't work,can anyone help me? Thanks to all This is my code: unsigned int i; void interrupt() { if (INTCON.RBIF==1) { delay_m...
by enryv
10 Aug 2012 08:49
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text problem
Replies: 2
Views: 1532

Re: UART1_Read_Text problem

Thank a lot Fakir...I have solved the problem.....serial.println prints data to the serial port as human-readable ASCII text followed by a carriage return character (ASCII 13, or '\r')...i have I replaced it with Serial.print.....it's works :)
by enryv
09 Aug 2012 09:37
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text problem
Replies: 2
Views: 1532

UART1_Read_Text problem

Hi, I have linked a PIC16F887 and an Arduino mega 2560 with serial uart (Rx e Tx pin).....I have some problem with UART1_Read_Text...I don't succeed in entering to Dat[1] ..It should be 1 (second data send by arduino)...the buzzer don't play... Thanks to all This are my codes: CODE FOR ARDUINO: Int ...
by enryv
21 Jul 2012 09:13
Forum: mikroC PRO for PIC General
Topic: synchronization problem between Pic arduino
Replies: 2
Views: 1187

Re: synchronization problem between Pic arduino

Thanks for your answer!!
I have modified my code how you tell me....please can someone explain me how manage a character of start and stop for syncronize reading and writing.
thanks :)
by enryv
19 Jul 2012 09:07
Forum: mikroC PRO for PIC General
Topic: synchronization problem between Pic arduino
Replies: 2
Views: 1187

synchronization problem between Pic arduino

Hi, i have linked with serial(Uart) a PIC16f887 with an arduino mega 2560. My is a synchronization problem....i want that the pic reads data after they have been written by the arduino ....how can i resolve this problem?? do I need additional signals?or i need only of other instructions? thanks to a...
by enryv
09 Apr 2011 16:14
Forum: Development Boards
Topic: detected pic???
Replies: 1
Views: 1018

detected pic???

I'm using Micro prog suite to program PIC 16F887;i want try the example that make work the lcd display (2x16). I'm using easy pic 5 When i click write appear the message: Device detected PIC 12F508 , Device selected PIC 16F887 continue anyway?? ….but I want program only pic selected that is PIC 16F8...

Go to advanced search