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

USB PIC18

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







USB PIC18
PostPosted: Wed Jun 03, 2009 10:55 am     Reply with quote

Anybody could help me by explaining the last input (toggle) of this USB function:
Code:
usb_put_packet(endpoint,*ptr,len,toggle);

I found this sentence in (pic18_usb.c) documentation:
(Toggle - whether to send data with a DATA0 pid, a DATA1 pid, or toggle from the last DATAx pid)

But I can't understand??

Also I want to know if writing:
Code:
#fuse XTPLL,INTXT, PLL1

Is true to indicate that a crystal (4MHz) will be used with pll for USB and the internal oscillator will be used for CPU.

Thanks a lot for your help. Very Happy Very Happy
Amr_Pic
Guest







Thanks For NO REPLY
PostPosted: Tue Jun 09, 2009 8:43 am     Reply with quote

Thanks For NO REPLY Surprised Surprised Surprised
Amr_PIC
Guest







Thx
PostPosted: Tue Jun 09, 2009 8:44 am     Reply with quote

Sad Sad Sad
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Jun 09, 2009 9:26 am     Reply with quote

The purpose of the toggle bit is fully documented in the USB20 spec, see www.usb.org. The PIC18 manual is rather refering to the meaning of data toggle than giving an explanation.

Regarding Oscillator select fuse bits, the PIC18 manual clarifies that the oscillator modes are mutual exclusive, you can either select XTPLL or INTXT. As far as I understand, INTXT won't work for High Speed USB. But you may want to consult manual chapter 2.3 Oscillator Settings for USB yourself.
Ttelmah
Guest







PostPosted: Tue Jun 09, 2009 12:52 pm     Reply with quote

The syntax to use the external oscillator for USB, and the internal for the CPU, is just:

INTRC,PLL1,USBDIV

The external oscillator block, is _not_ turned off by selecting the internal oscillator for the CPU. Look at the oscillator diagram for the chip, and the names against the oscillator paths in this.

Best Wishes
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