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 support@ccsinfo.com

18F97J60 problem about clock

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
wsinw



Joined: 15 Jul 2009
Posts: 3

View user's profile Send private message

18F97J60 problem about clock
PostPosted: Wed Jul 15, 2009 4:16 am     Reply with quote

I study PIC with 18F97J60 on Microchip's PICDEM.net2 board.
I've got problem about rs-232 baud rate. I measure the Tx output that too slow about 5 bit per sec. And measure the (25MHz) oscillator's output that about 6.6 kHz. What's wrong in my board? I replace that OSC with many osillator.

I think there's something about SFR or OSC option?
Please help me. Thank you.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 15, 2009 11:53 am     Reply with quote

Post a test program that sends a continuous 0x55 byte using putc()
in a while() loop.

Post the #include, #fuses, #use delay(), #use rs232() statements,
and the main(). It must be compilable.

Post your compiler version.
wsinw



Joined: 15 Jul 2009
Posts: 3

View user's profile Send private message

detail
PostPosted: Wed Jul 15, 2009 12:09 pm     Reply with quote

I use CCS V.4.088 , and code just simple
Code:

#include "18F97J60.h"

#fuses HS,NOWDT,NOPROTECT
#use delay(clock=25000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)

//hardware
#define relay1 PIN_J0
#define relay2 PIN_J1
#define relay3 PIN_J2
#define relay4 PIN_J3
#define relay5 PIN_J4
#define relay6 PIN_J5
#define relay7 PIN_J6
#define relay8 PIN_J7

unsigned int i;
unsigned int x;

void main(void)
{
    output_high(relay1);   
    output_high(relay2);
   
    while (1)   
    {
        putc(0x55);
    }
}



thank you PCM programmer
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 15, 2009 12:50 pm     Reply with quote

Quote:
I measure the Tx output that too slow about 5 bit per sec.

How are you measuring this ? With an oscilloscope or frequency counter ?

Quote:

And measure the (25MHz) oscillator's output that about 6.6 kHz

How are you measuring this ? What pin are you looking at on the
oscillator or the PIC to measure the signal ?


Quote:
I replace that OSC with many osillator.

Here is the User's manual for the board.
http://ww1.microchip.com/downloads/en/DeviceDoc/51623b.pdf
On page 38 (page 42 in the Acrobat reader), it shows that crystal Y2 is
25 MHz.
Here's a photo of the PicDem.net 2 board. It shows that Y2 is a surface
mount crystal, which is soldered to the board on the right side of the PIC.
http://img-europe.electrocomponents.com/largeimages/R0381564-01.jpg
Why would you remove a soldered-in factory-installed crystal,
several times ? I am not sure if I believe you.
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Jul 15, 2009 11:14 pm     Reply with quote

I have a picdem.net2 and it works just as expected out of the box.

I even have the CCS TCP/IP demo running on it.

The OSC is a crystal. Not an oscillator.. (with CMOS/TTL compat drive).

Figure that this was tested (and came installed with demo firmware that would have proved the functionality of the PCB out of the box).

Oy.... and now you've been soldering away at it... (double oy)

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
wsinw



Joined: 15 Jul 2009
Posts: 3

View user's profile Send private message

thank you
PostPosted: Thu Jul 16, 2009 2:52 am     Reply with quote

thank to everyone ,

I configure system in some #fuse , it's too complex.
I doubtful in OSC replace.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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