Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

18F2550 USB on VB Express 2008

Status
Not open for further replies.

serkanc

New Member
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:confused:
 
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
:D
 
Last edited:
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top