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

PIC18F26J11 / CCS PCWH help

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



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

PIC18F26J11 / CCS PCWH help
PostPosted: Sun Jul 19, 2009 5:23 pm     Reply with quote

I'm using PCWH V4.095 (just updated) and a PIC18F26J11 processor. I am a little confused with some of the new fuse definitions and a couple of the settings.

I've managed to get the second hardware serial port mapped and responding to the serial data receive interrupt correctly. The readme file explained how to use the #PIN_SELECT to set the functions.

1. Is there a summary list of the pin defintions used for the #PIN_SELECT directive? In other words "U2TX" is the second UART transmit pin and "U2RX" is the second UART receive pin. Is there a list of all the valid pins?

2. Is the summary set of fuse definitions defined anywhere? I see from the fuses listing in the compiler IDE that there is a number in front. I think this is the section in the datasheet defining this fuse but they don't quite map out to the same as what's listed. For instance, I see a #fuse H4_SW defined but is this the PLL selection?

3. According to the datasheet, the device should work up to 48MHz with the PLL. I'm trying to get the device to run with an external crystal of 9.216MHz and the PLL (* 4) for an operational speed of 36.864MHz. I tried the H4_SW fuse but the system was recognized as 9.216MHz, not 36.864MHz. Does the "SW" mean software switched? How do I enable that?

4. How would I select the internal 8MHz oscillator? Can this be used in conjunction with the * 4 PLL for an operational rate of 32MHz? How do I select these fuses?

5. In looking at the file for the 18F26J11, it appears there is an RTC internal to the device with a setup_rtc() function. Where is the definition of the RTC functions and parameters? Is this like an external RTC (like an I2C device like the Xicor X1226, the STI M41T81, the Maxim DS1338 or similar) where I could set the date/time and then get the updated date/time values later during program execution?

Thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 19, 2009 6:08 pm     Reply with quote

Quote:
Is there a summary list of the pin defintions used for the #PIN_SELECT directive?

There's a list of the abbreviations that CCS uses for #pin select in
the PCD manual on page 126 (page 138 in the Acrobat reader):
http://www.ccsinfo.com/downloads/PCDReferenceManual.pdf

Quote:
Is the summary set of fuse definitions defined anywhere?

If you have the CCS IDE compiler (PCWH, etc.), look for fuses.txt
in your compiler directory.
If no, see this link:
http://www.ccsinfo.com/forum/viewtopic.php?t=31698
Also, if you don't have the Fuses.txt file, someone has posted it in
another forum. It's near the end of this page:
http://www.todopic.com.ar/foros/index.php?topic=16947.0


Quote:
I'm trying to get the device to run with an external crystal of 9.216MHz
and the PLL (* 4) for an operational speed of 36.864MHz. I tried the
H4_SW fuse but the system was recognized as 9.216MHz, not 36.864MHz.
Does the "SW" mean software switched? How do I enable that?

See the sample program in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=38087
Also
http://www.ccsinfo.com/forum/viewtopic.php?t=32793
http://www.ccsinfo.com/forum/viewtopic.php?t=33581


Quote:

In looking at the file for the 18F26J11, it appears there is an RTC internal
to the device with a setup_rtc() function. Where is the definition of the
RTC functions and parameters

They are apparently in the PCD manual. Microchip has started adding
advanced features to their 18F-series. CCS hasn't updated the
PCH manual yet. So look in the other manual for now.
http://www.ccsinfo.com/downloads/PCDReferenceManual.pdf
starfire151



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

PostPosted: Mon Jul 20, 2009 7:06 pm     Reply with quote

Thanks very much, PCM Programmer... You da Man! Very Happy
bkamen



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

View user's profile Send private message

PostPosted: Wed Jul 22, 2009 8:54 pm     Reply with quote

I'm (still) writing code for an 18F46J11 -- they're a blast.

It's so nice to have 2 UART's on a small (<64 pin) package.

The re-mappable pins are fabulous (once they work).

Enjoy your 26J11 project!

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



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

PostPosted: Thu Jul 23, 2009 12:12 pm     Reply with quote

I agree! This is a great processor family. One of Microchips' best efforts that I've used. The second hardware com port (and associated recv data ISR) is very useful. I will use this feature often. The *4 PLL and operation up to 48MHz lets the code get through quicker, also.

I'm starting to play with the internal RTC feature of this family, which is kind of downplayed but a very nice feature. As most of my applications require an external RTC chip, this simplifies the hardware interface without having to lose functionality.

Please see the links posted in the response from PCM Programmer (above) for the PCD manual. This is very useful and explains many features not currently documented in the PCWH manual (setup_rtc(), etc).

I had been using the PIC18LF2620 but I've discovered a new favorite processor... the PIC18F26J11!

Enjoy this new family... it's great! Great job, Microchip!


Dave
bkamen



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

View user's profile Send private message

PostPosted: Thu Jul 23, 2009 1:00 pm     Reply with quote

The RTC is very nice.

I used the PPS output from the GPS I get the time from and then did a little offset adjustment with INT0.

It's pretty fabulous...

I also used the IDLE modes which ends up drawing a lot less current while still running at full speed than when the core is doing something...

The chip is really quite versatile.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Pulsartomi



Joined: 26 May 2010
Posts: 17

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 10:30 am     Reply with quote

Hello All!
I didn't want to create a new topic for this.
I have problem with ccs 18f46j11.h, because it has defined pins only for 28-pin version.But i would like to use the 44-pin TQFP.
PORT D is not defined, nor PORT E (for example #define PIN_D0 is missing from header file).Can i define with the pin's address?What could it be?

Thank You Razz
bkamen



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

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 10:37 am     Reply with quote

You must be using an older version of PCH, I'm looking at 18F46j11.h and I show port D and E.

What version of PCWH are you using?

The current version is: 4.107
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Pulsartomi



Joined: 26 May 2010
Posts: 17

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 10:41 am     Reply with quote

Sure, it's an older version.
Thank You
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 1:28 pm     Reply with quote

If you have a registered version you might ask CCS for an updated header
file. They should send it to you since that one is bad. The other option is to
copy the needed lines from another variant of the same version. Since I
am running the latest version of PCWH I can't look and see which ones you
might have.

Here are the port definition lines but there may be some other things missing as well:

Code:

#define PIN_D0  31768
#define PIN_D1  31769
#define PIN_D2  31770
#define PIN_D3  31771
#define PIN_D4  31772
#define PIN_D5  31773
#define PIN_D6  31774
#define PIN_D7  31775

#define PIN_E0  31776
#define PIN_E1  31777
#define PIN_E2  31778


_________________
Google and Forum Search are some of your best tools!!!!
Pulsartomi



Joined: 26 May 2010
Posts: 17

View user's profile Send private message

PostPosted: Mon Jun 07, 2010 7:46 am     Reply with quote

Thank You very much.

Tomi Razz
rsappia



Joined: 22 Dec 2010
Posts: 12

View user's profile Send private message

PostPosted: Thu Dec 23, 2010 7:18 am     Reply with quote

bkamen wrote:
I'm (still) writing code for an 18F46J11 -- they're a blast.

It's so nice to have 2 UART's on a small (<64 pin) package.

The re-mappable pins are fabulous (once they work).

Enjoy your 26J11 project!

-Ben



Hi!!! I would like to share this thought... but right now Im having some delays in my code because of this PPS feature that i cant get running well...

Could you please give some advice on this?

http://www.ccsinfo.com/forum/viewtopic.php?t=44325

Thanks in advance!!
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