|
|
View previous topic :: View next topic |
Author |
Message |
Amr_PIC Guest
|
USB PIC18 |
Posted: Wed Jun 03, 2009 10:55 am |
|
|
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. |
|
|
Amr_Pic Guest
|
Thanks For NO REPLY |
Posted: Tue Jun 09, 2009 8:43 am |
|
|
Thanks For NO REPLY |
|
|
Amr_PIC Guest
|
Thx |
Posted: Tue Jun 09, 2009 8:44 am |
|
|
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Jun 09, 2009 9:26 am |
|
|
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
|
|
Posted: Tue Jun 09, 2009 12:52 pm |
|
|
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 |
|
|
|
|
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
|