View previous topic :: View next topic |
Author |
Message |
anawara Guest
|
usb mouse not functioning correctly |
Posted: Tue Feb 22, 2005 10:15 am |
|
|
I am trying to develop a usb peripheral using the PIC16C765 microcontroller. I have bought the 16C765JW controller to be able to erase the controller's rom. compilation of the usb_mouse example was successful and also the programming of the controller. However when I plug the controller into the computer nothing happens.
I have pulled up the D- to Vusb using a 1.5K resistor.
The hex file supported by microchip is working fine but it was written using the HITECH Pic C compiler.
Any suggestions? |
|
![](templates/subSilver/images/spacer.gif) |
dyeatman
Joined: 06 Sep 2003 Posts: 1924 Location: Norman, OK
|
|
Posted: Tue Feb 22, 2005 10:44 am |
|
|
This is NOT the Hitech C Board! Suggest you go to the HiTech C website to resolve your problems. |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Tue Feb 22, 2005 4:15 pm |
|
|
I am aware that this is not the HiTech board. I am asking about the examples provided with the CCS Pic C compiler which I am using. |
|
![](templates/subSilver/images/spacer.gif) |
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Tue Feb 22, 2005 5:20 pm |
|
|
The HEX file and code provided by CCS needs a 24MHz oscillator. What oscillator are you using? |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Tue Feb 22, 2005 5:41 pm |
|
|
I'm using a 6MHz crystal as was indicated in the schematic by Microchip. Is there any website where I can find a schematic for the CCS mouse circuit? Or should I just change the crystal and keep the same connections? |
|
![](templates/subSilver/images/spacer.gif) |
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Tue Feb 22, 2005 8:35 pm |
|
|
The CCS circuit with a PIC16C7x5 is just a PIC16C765 dropped into one of CCS's Software Prototyping Boards - nothing really special. Just replace the oscillator with 24MHz.
Are you using a HEX file from CCS? If so you may get by with a 6MHz oscillator if you use the programmer to enable the H4 fuse on the PIC16C7x5. Is there a H4 fuse on this chip, I can't remember. |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Wed Feb 23, 2005 2:40 am |
|
|
the hex file that I am using is the resulting one from the CCS compiler when it is used to compile the ex_usb_mouse.c example provided with the compiler. I only have the compiler. No prototyping board. can I send you a picture with the schematic of the circuit?[/img] |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Fri Feb 25, 2005 7:12 am |
|
|
Any ideas? the 6 MHz crystal is not working. Does any1 have a schematic that I can use? |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Fri Feb 25, 2005 7:21 am |
|
|
what if I change the source code to use a 6 MHz clock?
#include <16C765.h>
#device *=16
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=24000000) <---- set this value to 6 MHz instead of 24? |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Fri Feb 25, 2005 6:38 pm |
|
|
I've found the solution to the problem I had. Instead of using a 24 MHz crystal. I used a 6 MHz crystal and when programming the mcu i used the H4 OSC in the fuse. This property takes the 6 MHz generated by the crystal and generates an internal 24 MHz clock. |
|
![](templates/subSilver/images/spacer.gif) |
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Sat Feb 26, 2005 9:26 am |
|
|
anawara wrote: | I've found the solution to the problem I had. Instead of using a 24 MHz crystal. I used a 6 MHz crystal and when programming the mcu i used the H4 OSC in the fuse. This property takes the 6 MHz generated by the crystal and generates an internal 24 MHz clock. |
Is there some reason why you ignored this suggestion when I made it originally? |
|
![](templates/subSilver/images/spacer.gif) |
anawara
Joined: 22 Feb 2005 Posts: 7
|
|
Posted: Sat Feb 26, 2005 4:47 pm |
|
|
No. I am kind of new to this and I didn't understand exactly what the H4 OSC was. Thank you very much for your help. I really appreciate it |
|
![](templates/subSilver/images/spacer.gif) |
|