CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

blink led program in pic18F8722
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hemnath



Joined: 03 Oct 2012
Posts: 242
Location: chennai

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 9:15 pm     Reply with quote

Thank for helping me to solve the issue.

The board has a onboard 20Mhz crystal. Please have a look into that link. I am not wiring from the header pins RA6 and RA7.

I think the pins RA6 and RA7 in the header are used for, if the crystal is not used, the pins can be used as I/O pins.

I have double checked the traces from the crystal to micro-controller pins with an ohmmeter. continuity is present.

May be a faulty crystal condition as suggested by Ttlemah, So i changed the crystal and capacitors also.

LED blinks when I use the internal oscillator. But not for external crystal.

In the datasheet, on crystal configuration page, it is recommended to use 330Ohms resistor and also suggested by Ttelmah, I used those values. Still no blinking. Also I have changed the resistor values by trial and error. Still no improvement.

Please help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 10:05 pm     Reply with quote

Quote:
while(1)
{
output_high(PIN_D0);
delay_ms(500);
output_low(PIN_D0);
delay_ms(500);
}

I have a question about this. The photo of the board shows an LED
which is labeled "RB0", but your code is trying to blink pin RD0. Why ?
http://www.nskelectronics.com/pic_18f8723_80_io__target_board_.html
hemnath



Joined: 03 Oct 2012
Posts: 242
Location: chennai

View user's profile Send private message

PostPosted: Mon Dec 15, 2014 11:47 pm     Reply with quote

I have connected a LED with a series resistor of 330 Ohms from header RD0 pin.
Ttelmah



Joined: 11 Mar 2010
Posts: 20063

View user's profile Send private message

PostPosted: Tue Dec 16, 2014 9:50 am     Reply with quote

It is the long runs to the external header that has us worried. Problem is that the track capacitance will almost certainly exceed the required crystal capacitance....
Also the long tracks make a whisker more and more likely. Have you tested with an ohmmeter. You need to sit down, and verify that there is no connection between the crystal pins themselves, and then that there is no connection to _every_ track that runs close to the line. _Every_ track. Also that there is a physical connection from the PIC pins to the crystal.
hemnath



Joined: 03 Oct 2012
Posts: 242
Location: chennai

View user's profile Send private message

PostPosted: Tue Dec 16, 2014 9:07 pm     Reply with quote

Yes I checked every trace with an ohmmeter.

I cut the trace from header to crystal. The trace is get separated now. Now the connections is established from crystal to micro-controller pins. Also checked the connections from capacitors also.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group