Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 18th May 2008, 08:32 AM   #1
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
serkanc is offline  
Old 18th May 2008, 10:31 AM   #2
Default

Send your data as ASCII, not as binary.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 18th May 2008, 12:16 PM   #3
Default

Could you attach the vb source code?
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 18th May 2008, 12:36 PM   #4
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 02:01 PM.
serkanc is offline  
Old 18th May 2008, 02:04 PM   #5
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.
serkanc is offline  
Reply

Tags
2008, express, usb

Thread Tools
Display Modes


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



All times are GMT. The time now is 04:49 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker