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 mouse not functioning correctly

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







usb mouse not functioning correctly
PostPosted: Tue Feb 22, 2005 10:15 am     Reply with quote

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?
dyeatman



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

View user's profile Send private message

PostPosted: Tue Feb 22, 2005 10:44 am     Reply with quote

This is NOT the Hitech C Board! Suggest you go to the HiTech C website to resolve your problems.
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Tue Feb 22, 2005 4:15 pm     Reply with quote

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.
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

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

PostPosted: Tue Feb 22, 2005 5:20 pm     Reply with quote

The HEX file and code provided by CCS needs a 24MHz oscillator. What oscillator are you using?
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Tue Feb 22, 2005 5:41 pm     Reply with quote

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?
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

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

PostPosted: Tue Feb 22, 2005 8:35 pm     Reply with quote

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.
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Wed Feb 23, 2005 2:40 am     Reply with quote

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]
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Fri Feb 25, 2005 7:12 am     Reply with quote

Any ideas? the 6 MHz crystal is not working. Does any1 have a schematic that I can use?
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Fri Feb 25, 2005 7:21 am     Reply with quote

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?
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Fri Feb 25, 2005 6:38 pm     Reply with quote

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.
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

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

PostPosted: Sat Feb 26, 2005 9:26 am     Reply with quote

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?
anawara



Joined: 22 Feb 2005
Posts: 7

View user's profile Send private message MSN Messenger

PostPosted: Sat Feb 26, 2005 4:47 pm     Reply with quote

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