+ Reply to Thread
Results 1 to 5 of 5

Thread: 18F2550 USB on VB Express 2008

  1. #1
    serkanc Newbie
    Join Date
    May 2007
    Posts
    7

    Default 18F2550 USB on VB Express 2008

    Hi. I tried to control step motor over usb. I write program on VB Express 2008, for microchip on PBP 2.46.. I have a problem with sending data. If I send a byte which has value over 127, pic takes it always as 63 ( Ascii code of question mark ). I'm using CDC interface, endpoint 3. Is there any solution


  2. #2
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,794

    Default

    Send your data as ASCII, not as binary.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  3. #3
    gramo Excellent gramo Excellent gramo Excellent gramo Excellent gramo Excellent gramo Excellent
    Join Date
    Oct 2006
    Location
    Australia
    Posts
    1,207
    Blog Entries
    3

    Default

    Could you attach the vb source code?

  4. #4
    serkanc Newbie
    Join Date
    May 2007
    Posts
    7

    Talking

    For Each sp As String In My.Computer.Ports.SerialPortNames
    ComboBox1.Items.Add(sp)
    Next
    SerialPort1.Encoding = System.Text.Encoding.GetEncoding(28591)

    SerialPort1.PortName = ComboBox1.SelectedItem
    SerialPort1.Open()


    SerialPort1.Write("M" & ChrW(Duty)




    Thanks. It works. i have added this line to VB:
    SerialPort1.Encoding = System.Text.Encoding.Default
    Last edited by serkanc; 18th May 2008 at 01:01 PM.

  5. #5
    serkanc Newbie
    Join Date
    May 2007
    Posts
    7

    Default

    I have also one more problem to solve..
    I tried to run a fan with pwm with ULN2003. Need I connect the PIC Ground to the ULN2003 or Fan Supply Ground is enough?

    How can I read Fan Rpm on the third cable of Fan ? Is there any example.

+ Reply to Thread

Similar Threads

  1. interfacing ibutton to PC using USB
    By konzen in forum General Electronics Chat
    Replies: 26
    Latest: 13th May 2008, 10:31 AM
  2. How to modify a webcam to bypass USB?
    By The_UnforgiveN in forum Electronic Projects Design/Ideas/Reviews
    Replies: 6
    Latest: 4th May 2008, 03:16 PM
  3. USB Power hack with DC/DC Converter - am I crazy?
    By chconnor in forum Electronic Projects Design/Ideas/Reviews
    Replies: 14
    Latest: 8th March 2008, 09:13 PM
  4. Help needed developing USB peripheral using HID class
    By Adester in forum Micro Controllers
    Replies: 4
    Latest: 22nd November 2007, 02:42 PM
  5. usb interfacing problems for a waveform generator
    By simonharvey in forum Electronic Projects Design/Ideas/Reviews
    Replies: 0
    Latest: 26th September 2007, 11:32 PM

Tags for this Thread