akutisarizar
Newbie
Offline
Posts: 19
Thank You
-Given: 1
-Receive: 2
|
|
« on: July 30, 2007, 06:59:32 18:59 » |
|
dear all,
i have one project about connecting 18f4550 over usb and control it's pin status over pc sw. But there is no source file as example about it. If you can help . We will succseed
Best Regards, A. Sarizar
|
|
|
Logged
|
|
|
|
hate
Hero Member
Offline
Posts: 555
Thank You
-Given: 156
-Receive: 355
|
|
« Reply #1 on: July 30, 2007, 07:17:58 19:17 » |
|
Microchip have the examples you need, look for 18f4550 applications on Microchip website!
Regards...
|
|
|
Logged
|
Regards...
|
|
|
akutisarizar
Newbie
Offline
Posts: 19
Thank You
-Given: 1
-Receive: 2
|
|
« Reply #2 on: August 07, 2007, 09:49:50 21:49 » |
|
any one doesnt have any source code as a sample .
|
|
|
Logged
|
|
|
|
bbarney
Moderator
Hero Member
Offline
Posts: 2429
Thank You
-Given: 405
-Receive: 545
Uhm? where did pickit put my mute button
|
|
« Reply #3 on: August 08, 2007, 05:53:23 17:53 » |
|
|
|
|
Logged
|
Ever wonder why Kamikaze pilot's wore helmet's ?
|
|
|
|
softjad
Junior Member
Offline
Posts: 51
Thank You
-Given: 12
-Receive: 95
|
|
« Reply #5 on: August 21, 2007, 08:43:31 20:43 » |
|
CCS has several examples to work
|
|
|
Logged
|
|
|
|
neteagle
Newbie
Offline
Posts: 8
Thank You
-Given: 1
-Receive: 0
|
|
« Reply #6 on: January 08, 2008, 08:13:19 20:13 » |
|
Check the microchip forum, ther are some very interssing stuff on the PIC18F4550 USB section.
|
|
|
Logged
|
|
|
|
lek05134
Newbie
Offline
Posts: 10
Thank You
-Given: 0
-Receive: 1
|
|
« Reply #7 on: January 10, 2008, 02:55:15 02:55 » |
|
|
|
|
Logged
|
|
|
|
|
fb2007
Guest
|
|
« Reply #9 on: January 15, 2008, 12:11:21 12:11 » |
|
...my approach on this:
- MikroC for the PIC - HIDLIBRARY.DLL from Mike Obrian - Visual Studio 2005
Exchange data with my USB device:
Private Sub ReadInternalADC()
Dim InputData As HIDLibrary.HidDeviceData Dim i As Integer Dim OutputText As String Dim uInput As Integer
'--> Enumerate the devices with the Vendor Id '--> and Product Id of the DDS Stuff HidDeviceList = HIDLibrary.HidDevices.Enumerate(&H1235, &H1)
If HidDeviceList.Length > 0 Then
HidDevice = HidDeviceList(0)
'--> Check if connected...
HidDevice.OpenDevice()
Dim OutData As Byte()
ReDim OutData(HidDevice.Capabilities.OutputReportByteLength - 1)
'--> Send a report to Device (8888888 is command to PIC to answer with data..)
OutData(1) = Asc("8") OutData(2) = Asc("8") OutData(3) = Asc("8") OutData(4) = Asc("8") OutData(5) = Asc("8") OutData(6) = Asc("8") OutData(7) = Asc("8") OutData(Cool = Asc("8")
HidDevice.Write(OutData) InputData = HidDevice.Read OutputText = ""
For i = 1 To 5 OutputText = OutputText + Chr(InputData.Data(i)) Next
uInput = Int((Val(OutputText) * 4.7 / 1.024) + 0.5) ' convert Text answer (ADC) to Voltage
End If
End Sub
|
|
|
Logged
|
|
|
|
iphone
Active Member
Offline
Posts: 168
Thank You
-Given: 115
-Receive: 10
|
|
« Reply #10 on: January 15, 2008, 05:01:17 17:01 » |
|
fb2007,
Will you share the complete & working package ( including schemartic, hex, vc, driver, guide and tips) ?
|
|
|
Logged
|
|
|
|
|