One part of the hardware of our thesis is to control two servo motors from a laptop. To make things easier, we decided to use the USB-ready PIC18F4550. Aside from it being able to communicate with a computer through the USB port, pwede rin iprogram ito without a programmer basta may bootloader na siya. Ung design po namin ay based sa website na ito: http://www.create.ucsb.edu/~dano/CUI/
What I understand from reading the website is:
1) Build the DIY CUI(Create USB Interface) module - here is the schematic and layout: http://www.create.ucsb.edu/~dano/CUI/#Sec2.
2) Download the bootloader from the website and burn it on the module (this becomes what is called the "firmware" tama po ba?) using a programmer. We are using a genuine PICkit2 - very expensive.
3) Connect the module to the computer using the USB cord. Push and hold the "program" button and the computer will detect the module. Maghahanap daw ng driver ung computer so on the driver installation wizard, the user must point to the location of the driver (also downloadable from the website). Magiinstall n daw ung driver and pwede nang magburn using the bootloader program.
So we constructed the module, burned onto it the bootloader, and plugged it into the computer. Unfortunately, eto ang nangyari when we plugged in the module.
On the bottom right corner of the desktop screen nagappear ang isang box with the heading "USB Device Not Recognized". The computer did not search for a driver, kaya I (left alone kc nagsiuwian n mga kagrupo) opened the device manager and double clicked on the Unknown Device under USB controllers. The properties box appeared and I clicked on the Driver tab. I tried updating the driver by pointing the wizard to the location of the driver file (mchpusb.inf), but the the message "The specified location does contain information about your hardware" appeared. Even when I let the wizard automatically search for drivers, the result was unfruitful as well ("The wizard could not find a better match for your hardware than what is currently installed, etc...").
I also tried the "Uninstall" button to uninstall the Unknown device. Inireset ko ung module and three balloons appeared successively on the bottom right part of the desktop screen: FOUND NEW HARDWARE (USB DEVICE) -->> FOUND NEW HARDWARE (Unknown Device) -->> YOUR HARDWARE IS INSTALLED AND READY TO USE.
I read the instructions on the website several times and repeated the procedures at the same time. All in vain, parehas lng ang results. So naisip ko baka may error ako sa hardware. I double, triple, and many times checked the module, ok naman xa. I tried modifying the driver files (kc dpat daw magmatch ung vid and pid ng driver to that of the firmware). I downloaded an unknown device identifier program which displays the information on devices in intelligible words instead of hex. Inirun ko tas may nakadisplay na MICROCHIP device so I copied its VID and PID and then included these in the list of VID's and PID's sa driver file (mcphusb.inf). All the same, ayaw pa din maginstall ung driver. I later realized na VID at PID pla yta un ng PICKit 2.
Since the CUI module is based on modules made by MICROCHIP, I modified our design pra maging tulad ng Microchip PIC18F4550 USB Prototyping Board n nasa site na to: file:///G:/yogurt/product_info.php.htm.
Eto po ung schematic which is quite similar to the CUI module: http://microcontrollershop.com/Images/PIC-USB-4550-sch.gif?osCsid=b2b6c971bfca56f08038d1f69d02ece9
Sa website ay may downloadable din n bootloader at driver, which are officially from Microchip. All the same, ayaw din maginstall ng driver. It seems that the computer automatically detects the module as an Unknown Device tas iinstall nya kaagad ung "driver for unknown devices?"..i really am not sure about this.
Anyways I found another website (http://eegeek.net/content/view/13/32/
) about the PIC18F4550 USB module. Parehas din lng n ayaw ung mga drivers dito kc based din lng or the same sa driver ng Microchip.
One fine day I came across sir Marcelino's post about his own version of Pinguino (http://www.electronicslab.ph/forum/index.php/topic,14314.0.html
Ang ginamit dito ay PIC18F2550. Nabanggit po nya na may F4550 version ang Pinguino so I followed the link to http://www.hackinglab.org/pinguino/index_pinguino.html.
I found the design for the 4550 Pinguino,and fortunately similar lang sila ng design ng CUI module (may slight modifications lng na necessary). Naiburn ko po ung bootloader, at nainstall ko po ung driver easily. Unfortunately I find the Pinguino IDE very different kc dun k n mismo ggwa at magcocompile ng program. Iba ung paraan ng pagprogram tas wla p maxado mga tutorials. I still prefer MPLAB sana.
Eto po ung mga conclusions/katanungan ko:
1)I think the hardware of our module is ok because the Pinguino firmware was identified successfully by the computer; the installation of the driver was successful as well.
2)Has anyone of you guys/sirs/mesdames tried building a PIC18F4550 at napagana using the bootloader and driver provided by Microchip? penge po ng advice.
3)I've spent so much time on trying to install the driver that I still haven't read yet on the USB protocol and how 4550 communicates with computer through USB. Tas kailangan p yata ng visual basic or C# programming pra mkagawa ng application on the computer pra sa module. We intend to create a simple application which will control the two servo motors. For instance, each of the servo motors has, say 10 buttons, each corresponding to a step angle - 10 degrees, 20 degrees, 30 degrees, etc.. so if the 10 degrees- button is pressed, the shaft of the corresponding servo motor will move to the 10 degree position. Meron po bang nkkalam ng mabilisang tutorial nito, or better yet example programs which we can modify and from which we can learn in a short period of time..
4) Thank you for reading this rather long post.. I think I've wasted so much time on trying to install the driver kaya I decided to ask from the masters so I made this post..mejo malapit lapit n rin po kc ung deadline..maraming salamat po ulit sa pagbasa at hopefully sa pagreply to this post..
My OS is Win XP Professional version 2002 Service pack 2 by the way