shivakumar.r
Member level 1
- Joined
- Sep 5, 2011
- Messages
- 39
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,601
Dear Friends,
I am using PIC16F1829 and XC8 compiler.
I am using external crystal of 4MHZ.
I am just trying to blink an LED for every 2 seconds.
I have used __delay_ms(2000); function to generate 2 seconds of delay.Also before the main i have included _XTAL_FREQ 4000000
Compiler is not giving any error,after i program the device instead of LED blinking for 2 seconds it is blinking for less than 1 seconds.
I have previously used Hightech c compiler and code was working fine and delays were accurate.Only if i use XC8 compiler i am getting this issue....
Please help me to solve this issue.......
I am using PIC16F1829 and XC8 compiler.
I am using external crystal of 4MHZ.
I am just trying to blink an LED for every 2 seconds.
I have used __delay_ms(2000); function to generate 2 seconds of delay.Also before the main i have included _XTAL_FREQ 4000000
Compiler is not giving any error,after i program the device instead of LED blinking for 2 seconds it is blinking for less than 1 seconds.
I have previously used Hightech c compiler and code was working fine and delays were accurate.Only if i use XC8 compiler i am getting this issue....
Please help me to solve this issue.......