PR26 - game contoller not detected

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

PR26 - game contoller not detected

Postby internetscooter » Fri Oct 19, 2012 5:08 pm

Hi,

It looks like I have done everything right but my game controller is not detected Linux/Windows 7/Mac. Nothing pops up like it is trying to install something and fails, just does nothing...

Here is my diagnostic info:

* Green PWR led is on (power getting through from USB)

* I can program, read, erase, read (zeros), program, read (program) and verify (red light flashes)
Code: Select all
Verifying Target
PIC18F2550 found (Rev 0x7)
Verifying Program Memory (0x0 - 0x7FFF)
Verifying EEPROM Memory (0x0 - 0xFF)
Verifying User ID Memory
Verifying Configuration Memory
PICkit 2 Ready


* Once suspicous thing is the message about power
Code: Select all
Found PICkit 2 - Operating System Version 2.32.0
PICkit 2 Unit ID = UIC00B V1.0
[b]Target power not detected - Powering from PICkit 2 ( 5.00V)[/b]
PIC18F2550 found (Rev 0x7)
PICkit 2 Ready

All the jumpers are there and there appears to be no shorts - any suggests on what it could be?

Below shows the code builds ok and the versions I use - any help appreciated!

Paul

Code: Select all
----------------------------------------------------------------------
Release build of project `D:\max\GameController\MaxGameController\MaxGameController.mcp' started.
Language tool versions: mpasmwin.exe v5.46, mplink.exe v4.44, mcc18.exe v3.43, mplib.exe v4.44
Fri Oct 19 20:06:40 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "D:\max\GameController\MaxGameController\usb_device.o".
Clean: Deleted file "D:\max\GameController\MaxGameController\usb_function_hid.o".
Clean: Deleted file "D:\max\GameController\MaxGameController\main.o".
Clean: Deleted file "D:\max\GameController\MaxGameController\usb_descriptors.o".
Clean: Deleted file "D:\max\GameController\MaxGameController\MaxGameController.cof".
Clean: Deleted file "D:\max\GameController\MaxGameController\MaxGameController.hex".
Clean: Done.
Executing: "C:\Program Files (x86)\Microchip\mplabc18\v3.43\bin\mcc18.exe" -p=18F2550 "D:\max\GameController\Source Code PR26\Source Code PR26\usb_device.c" -fo="usb_device.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files (x86)\Microchip\mplabc18\v3.43\bin\mcc18.exe" -p=18F2550 "D:\max\GameController\Source Code PR26\Source Code PR26\usb_function_hid.c" -fo="usb_function_hid.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files (x86)\Microchip\mplabc18\v3.43\bin\mcc18.exe" -p=18F2550 "D:\max\GameController\Source Code PR26\Source Code PR26\main.c" -fo="main.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files (x86)\Microchip\mplabc18\v3.43\bin\mcc18.exe" -p=18F2550 "D:\max\GameController\Source Code PR26\Source Code PR26\usb_descriptors.c" -fo="usb_descriptors.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files (x86)\Microchip\mplabc18\v3.43\bin\mplink.exe" /p18F2550 "..\Source Code PR26\Source Code PR26\rm18f2550 - HID Bootload.lkr" "usb_device.o" "usb_function_hid.o" "main.o" "usb_descriptors.o" /u_CRUNTIME /z__MPLAB_BUILD=1 /o"MaxGameController.cof" /M"MaxGameController.map" /W
MPLINK 4.44, Linker
Device Database Version 1.9
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

MP2HEX 4.44, COFF to HEX File Converter
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

Loaded D:\max\GameController\MaxGameController\MaxGameController.cof.
----------------------------------------------------------------------
Release build of project `D:\max\GameController\MaxGameController\MaxGameController.mcp' succeeded.
Language tool versions: mpasmwin.exe v5.46, mplink.exe v4.44, mcc18.exe v3.43, mplib.exe v4.44
Fri Oct 19 20:06:44 2012
----------------------------------------------------------------------
BUILD SUCCEEDED
internetscooter
Freshie
 
Posts: 4
Joined: Fri Oct 19, 2012 4:38 pm

Re: PR26 - game contoller not detected

Postby robosang » Fri Oct 19, 2012 6:34 pm

PR26? Oh... this is the USB game controller using PIC18F2550, right? One of DIY project of Cytron. I did refer to this project when I start with PIC18F2550, playing the USB features.

I would suggest a photo of hardware would be good.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: PR26 - game contoller not detected

Postby yonghui » Fri Oct 19, 2012 9:34 pm

u try to check the device manager, see if any HID device detected?

programming the pic without powering the pic will cause the pickit2 to power up the pic when programming, this is normal.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: PR26 - game contoller not detected

Postby internetscooter » Sat Oct 20, 2012 6:03 am

Here's a low res pic...

Image

And a higher res one can be found here...

http://files.internetscooter.com/misc/PR26_USB_GameController.JPG

To program it, it needs its USB plugged in for power. So power should be there (and the PWR light is on). Maybe that is one area to concentrate on.

I am also guessing I should be able to debug the code and see what it is doing USB wise by putting in break points and hitting the reset button.

Paul
internetscooter
Freshie
 
Posts: 4
Joined: Fri Oct 19, 2012 4:38 pm

Re: PR26 - game contoller not detected

Postby robosang » Sat Oct 20, 2012 8:20 am

Nice photo, but seem like good soldering work, yet to see the bottom layer :)

Anyway, from my previous experience, if the USB does not work, it might because of several reasons:
1. USB cable
2. Reset is not pull high properly, PIC cannot run code
3. Capacitor at Vusb is not working properly, or wrong polarity, or not soldered properly
4. Crystal is not working or solder properly, causing PIC not to run the code in right timing, USB require high accuracy of timing
5. Last and not least, the code is not loaded :)
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: PR26 - game contoller not detected

Postby internetscooter » Sat Oct 20, 2012 1:37 pm

Thanks for the tips, I will report how I go... here's the back, a few splats but nothing obvious which would short semething out...

Image

And the higher res:
http://files.internetscooter.com/misc/PR26_rear.JPG

Hopefully a positive update soon :)

Paul
internetscooter
Freshie
 
Posts: 4
Joined: Fri Oct 19, 2012 4:38 pm

Re: PR26 - game contoller not detected

Postby yonghui » Mon Oct 22, 2012 11:09 am

try to clean the soldering using a brush.

its quite hard to see with bare eye what happened to the circuit.
try to check the Vdd of the PIC using multimeter when powering up with USB, try to check the MCLR pin whether its pull up when powered.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: PR26 - game contoller not detected

Postby internetscooter » Mon Oct 22, 2012 4:43 pm

Thanks everyone for the help - it turned out that crystal clock timing was the problem. I had not paid close attention to the capacitors and assumed they were all the same, however there were two that were 30pF which were intended for the crystal and I had stuck them elsewhere :(

All fixed now and working :)

Cheers,

Paul
internetscooter
Freshie
 
Posts: 4
Joined: Fri Oct 19, 2012 4:38 pm

Re: PR26 - game contoller not detected

Postby robosang » Mon Oct 22, 2012 6:31 pm

Woh! Miss that from the picture :) Good to hear it is working!
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm


Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 11 guests

cron