Mar 25, 2016 #1 M.Rehan Full Member level 2 Joined Feb 10, 2016 Messages 129 Helped 2 Reputation 66 Reaction score 33 Trophy points 28 Activity points 972 LEDs at PORTD are blinking about after 3 seconds Is there problem with oscillator selection? PIC 18F4550 MikroC pro Code C - [expand]1 2 3 4 5 6 7 8 9 10 void main() { TRISD = 0x00; while(1) { PORTD = 0xFF; Delay_ms(100); PORTD = 0x00; Delay_ms(100); } } Last edited by a moderator: Mar 25, 2016
LEDs at PORTD are blinking about after 3 seconds Is there problem with oscillator selection? PIC 18F4550 MikroC pro Code C - [expand]1 2 3 4 5 6 7 8 9 10 void main() { TRISD = 0x00; while(1) { PORTD = 0xFF; Delay_ms(100); PORTD = 0x00; Delay_ms(100); } }
Mar 25, 2016 #2 P pic.programmer Advanced Member level 3 Joined Aug 19, 2015 Messages 773 Helped 141 Reputation 284 Reaction score 140 Trophy points 43 Activity points 7,531 Oscillator settings are wrong. Please zip and post the complete mikroC project files. I will set the oscillator settings properly.
Oscillator settings are wrong. Please zip and post the complete mikroC project files. I will set the oscillator settings properly.
Mar 25, 2016 #3 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 52,493 Helped 14,757 Reputation 29,796 Reaction score 14,124 Trophy points 1,393 Location Bochum, Germany Activity points 298,405 To select 8 MHz INTOSC, OSCCON need to be written, presently default 1 MHz will be used.
Mar 25, 2016 #4 P pic.programmer Advanced Member level 3 Joined Aug 19, 2015 Messages 773 Helped 141 Reputation 284 Reaction score 140 Trophy points 43 Activity points 7,531 And also IRCFx_bits have to be set properly. Look 4550 datasheet Oscillator section for IRCFx_bit values.
And also IRCFx_bits have to be set properly. Look 4550 datasheet Oscillator section for IRCFx_bit values.