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 support@ccsinfo.com

USb Troubles!18F87J50 sort of works?

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



Joined: 21 Nov 2003
Posts: 200

View user's profile Send private message

USb Troubles!18F87J50 sort of works?
PostPosted: Sat Nov 10, 2007 10:05 am     Reply with quote

I am using a 18F87J50. I have used a 18F4550 with great success before. I am using the same driver as I was for the 4550. I have changed all the memory locations to suite the 87j50. The USB is sort of working. The problem I am having is that the computer says One of the USB devices attached to this computer has malfunctioned and windows does not recognize it. I am not a USB wiz by any means but the 4550 was working very well in a few applications. Let me know if I am missing something stupid or not.. Thanx in advance...
Guest








PostPosted: Sat Nov 10, 2007 1:44 pm     Reply with quote

Here is some more info.. Itlooks like nothing is getting through right..
I can see data on the lines at around 3.3 volts..
This is what shows up on usbview...

Device Descriptor:
bcdUSB: 0x0000
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x00 (0)
idVendor: 0x0000
idProduct: 0x0000
bcdDevice: 0x0000
iManufacturer: 0x00
iProduct: 0x00
iSerialNumber: 0x00
bNumConfigurations: 0x00

ConnectionStatus: DeviceFailedEnumeration
Current Config Value: 0x00
Device Bus Speed: Low
Device Address: 0x00
Open Pipes: 0
Guest








PostPosted: Sat Nov 10, 2007 2:08 pm     Reply with quote

Looks like my signal is not very good. Not a consistant bit pattern from what I can tell. Any thoughts on what might help that out?
Guest








PostPosted: Sat Nov 10, 2007 2:36 pm     Reply with quote

Might just be my scope. It is a digital but only goes to 20MHz which I don;t think is fats enough.. So I can not know for sure if the bits are nice really or not..
curt2go



Joined: 21 Nov 2003
Posts: 200

View user's profile Send private message

PostPosted: Sat Nov 10, 2007 4:46 pm     Reply with quote

Got it.. You have to set the PLL on. It does not do it automatically like the 4550.. So all you have to do to use the 87j50 is set the registers correctly and make sure you set the PLL on when you start.. Hope that helps some others.. TTY
zypher



Joined: 10 Nov 2007
Posts: 1

View user's profile Send private message

PostPosted: Mon Nov 12, 2007 3:18 pm     Reply with quote

FWIW, I ran into the same problem, and to enable the PLL I used the following code I found in the following thread, which worked for me:

http://www.ccsinfo.com/forum/viewtopic.php?t=27276

Code:

#byte OSCTUNE = 0xF9B
#bit PLLEN = OSCTUNE.6

void main()
{
PLLEN = 1;    // Enable PLL

while(1);
}
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