I agree with sparky although the uart interrupt is cleared once the register is read.
There are several uart examples with interrupt in this forum. Start with those and modify to suit your needs.
Search found 1074 matches
- 29 Jul 2012 08:41
- Forum: mikroC PRO for PIC General
- Topic: UART and multiple interrupts
- Replies: 5
- Views: 1674
- 29 Jun 2012 12:08
- Forum: mikroC PRO for PIC General
- Topic: Wireless with RS232 [SOLVED]
- Replies: 9
- Views: 6219
Re: Wireless with RS232 [SOLVED]
You need to verify the registers are correct for whatever chip you use. PIE1.RCIE=1; //enable receive interrupt INTCON.PEIE = 1; INTCON.GIE = 1; as well as LATB.F0 = ~LATB.F0; // indicates if no error in data transfer since some chips do not use LAT.xx but otherwise it should work. Just try it, the ...
- 03 Apr 2012 02:21
- Forum: mikroC PRO for PIC General
- Topic: Need help with a code. Beginner.
- Replies: 6
- Views: 1974
Re: Need help with a code. Beginner.
Have you looked at the examples? You can make slight modifications and get the results you are looking for and learn different programming strategies in the process. It is how I learned.
Break it up into individual parts. Button, timer, display, done.
Break it up into individual parts. Button, timer, display, done.
- 07 Mar 2012 00:59
- Forum: mikroC PRO for PIC General
- Topic: K.I.T.T. effect!!
- Replies: 1
- Views: 974
Re: K.I.T.T. effect!!
No, but we would be glad to help correct your attempt at the code. Start with the mE examples. Turn on a lite for a few hundred milliseconds then turn it off and another on and so on. When you get to the end, reverse the sequence. There are multiple ways of doing this sequencing and working through ...
- 17 Feb 2012 05:53
- Forum: mikroC PRO for PIC General
- Topic: DS18S20 thermometer 0.1C resolution
- Replies: 5
- Views: 2520
Re: DS18S20 thermometer 0.1C resolution
You seem to be assigning a float value to a char with extended_temperature.
I am a little rusty with my coding though.
I am a little rusty with my coding though.
- 17 Feb 2012 05:30
- Forum: mikroC PRO for PIC General
- Topic: Read coordinates touchscreen(UART)
- Replies: 2
- Views: 1458
Re: Read coordinates touchscreen(UART)
Have you tried inttostr() found in help file?
- 08 Oct 2011 20:54
- Forum: mikroC PRO for PIC General
- Topic: Need ADC function
- Replies: 2
- Views: 1212
Re: Need ADC function
Take a series of readings and average them. About 30 should be fine. Ill try to post some code later but no need to wait for me to try it out.
Btw "Dougs" are awesome.
Btw "Dougs" are awesome.
- 28 Sep 2011 17:57
- Forum: mikroC PRO for PIC General
- Topic: UART Interrupt Problem
- Replies: 2
- Views: 1212
Re: UART Interrupt Problem
Are the fuse settings the same for each?
- 13 Jul 2011 13:21
- Forum: mikroC PRO for PIC General
- Topic: rs232 read & write
- Replies: 5
- Views: 1874
Re: rs232 read & write
And use LCD_Chr_Cp() so you can increment on the LCD and not write over the previous text.
- 11 Jul 2011 02:26
- Forum: mikroC PRO for PIC General
- Topic: rs232 read & write
- Replies: 5
- Views: 1874
Re: rs232 read & write
You are writing the unsigned short in the same place on the LCD. I think you want to store all your received values in an array and then write it to the LCD.
also you could increment the LCD using LCD_Chr or similar.
also you could increment the LCD using LCD_Chr or similar.
- 29 May 2011 13:37
- Forum: mikroC PRO for PIC General
- Topic: Serial communication between PICs microcontrollers
- Replies: 1
- Views: 1613
Re: Serial communication between PICs microcontrollers
Have you used the PC as both a transmitter and receiver for testing?
On the PICs you have TX from one going to RX of other?
Are the grounds connected from both PICs? This is a common mistake.
On the PICs you have TX from one going to RX of other?
Are the grounds connected from both PICs? This is a common mistake.
- 22 May 2011 16:18
- Forum: mikroC PRO for PIC General
- Topic: General Voltage Regulator Question
- Replies: 19
- Views: 6127
Re: General Voltage Regulator Question
If it is running hot it could also be a current issue. What is your current draw?
- 13 May 2011 13:03
- Forum: mikroC PRO for PIC General
- Topic: strncmp and uart
- Replies: 2
- Views: 1100
Re: strncmp and uart
I think we might need to see more code.
Also, can you explain again the problem?
Also, can you explain again the problem?
- 12 May 2011 19:02
- Forum: mikroC PRO for PIC General
- Topic: Weird performance ADC of pic16f877
- Replies: 14
- Views: 3920
Re: Weird performance ADC of pic16f877
I would bet that noise is the problem. Do you have a regulated power supply and caps especially a 0.1 and maybe even a 0.01uF filter cap next to the VDD/VSS? I use the mE terminal program. Easy to access and full of features. What device/voltage are you sampling? Sometimes that can make a difference...
- 08 May 2011 04:49
- Forum: mikroC PRO for PIC General
- Topic: Receive PWM duty from PC with Rs232
- Replies: 6
- Views: 2323
Re: Receive PWM duty from PC with Rs232
Google translate says "gia tri truyen" is "values" in Vietnamese.