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

PIC18F67J50 using USB.....??

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



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

PIC18F67J50 using USB.....??
PostPosted: Tue Mar 22, 2011 4:53 am     Reply with quote

Hello,

I am planning a new project and want to use the PIC18F67J50...
Using the PIC Wizard I didn't see any USB related fuse setting.....
Is there something I missed???
Doesn't this device use USB fuses??? Or is mine compiler obsolete??

Regards,
Jody

Compiler version: 4.078
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Mar 22, 2011 4:57 am     Reply with quote

There are no USB related fuses, except for PLL settings.

Your compiler version is rather old anyway, you should expect some bugs that have been removed since long.
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

Updated the compiler
PostPosted: Thu Mar 24, 2011 3:37 am     Reply with quote

Oke have ordered a new compiler and I am now using 4.119...

But when running the PIC Wizard I can't find anything related to the USB from the PIC18F76J50.....

And according to the dataheet I must not only select the clock but also if if I am using LS or FS....

Is there anybody who know where I am mistaken??

Regards,
Jody
Ttelmah



Joined: 11 Mar 2010
Posts: 19480

View user's profile Send private message

PostPosted: Thu Mar 24, 2011 6:06 am     Reply with quote

Low speed, and full speed are not switched by fuses. If you look in the driver file, you will find there is a setting to change, and this automatically controls the 'FSEN' bit.
On the oscillator, start by looking at the oscillator diagram for your PIC, and comparing it with the one for the 4550. Note the big difference. On the 4550, and other similar PIC's, there is a separate clock 'path' from the oscillator to the USB. On your PIC, there is just one path to the output of the PLLEN switch.
However the basic setup is more or less the same. You need to start with an external crystal, that is a multiple of 4MHz. Then select the PLL divider (PLL1 etc.), to _divide_ this to 4Mhz. _Or_ you need to feed the chip with 48MHz, or 24MHz, directly.
You then have a choice of selecting the oscillator fuse as HS, or HSPLL, to set the PLLEN bit. Then if using slow speed) so you need 6MHz), the two bits controlling the divider feeding the USB, are the same two bits that control the CPU division ratio. So CPUDIV1, gives the clock/4, feeding the USB, while CPUDIV2, gives the /8.
So the reason for the lack of USB fuses, is that there aren't any. The FSEN bit is not a 'fuse', while the USB dividers, are all used for other jobs as well, and hence identified by these names.

Best Wishes
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 25, 2011 7:31 am     Reply with quote

Thanks!!!

And yes I did see that there was a different between a 4550 and this one...

And thanks for the explanation for the clock source.... I am sure I will get this working...

But what do you mean by the driver file???

Regards,
Jody
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