587,124 active members*
3,836 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Open Source Controller Boards > Pictures of CNCDuDeZ New USB-Parallel Interface.
Page 3 of 5 12345
Results 41 to 60 of 90
  1. #41
    Join Date
    Feb 2004
    Posts
    157
    Thanks for the info sean. I will check out that link as well.

    I am coding my software with realbasic so that I can have a crossplatform program. (windows and Mac OS).

    I will look over the VB code as Realbasic is similar and I think will import VB code.

    I can't wait to try this out. I know I have a lot to learn still with the I/O, but it looks pretty straight forward once you get into it.

    Thanks again for the help and all the free info and software, it is a great help.

    mike

  2. #42
    Join Date
    Jul 2005
    Posts
    113
    No probs

    As long as you can communicate with the MCHID.DLL via Realbasic then you should be okay.

    The include file in VB is called mcHIDInterface.bas which has the functions defined, so not sure how you create the equilent in Realbasic.

    Regards

    Sean.


    Quote Originally Posted by mwalach
    Thanks for the info sean. I will check out that link as well.

    I am coding my software with realbasic so that I can have a crossplatform program. (windows and Mac OS).

    I will look over the VB code as Realbasic is similar and I think will import VB code.

    I can't wait to try this out. I know I have a lot to learn still with the I/O, but it looks pretty straight forward once you get into it.

    Thanks again for the help and all the free info and software, it is a great help.

    mike

  3. #43
    Join Date
    Feb 2004
    Posts
    157
    I am not sure if realbasic can or not...but,

    realbasic has controls builtin for serial i/o. You just drag and drop the serial control into your projects, and tell it what your baud rate and parity etc will be.

    here is how my code in realbasic looks so far.

    Code:
      mSerial.SerialPort = System.SerialPort( 0 ) //The port number here        maybe should be a variable so the user can set the port.
      mSerial.Baud = 8 // 9600 baud 
      mSerial.Parity = 0 // No parity 
      mSerial.Stop = 0 // One stop bit 
      mSerial.Bits = 3 // Eight character bits 
      mSerial.CTS = true // Set the flow control to using CTS 
      
      
      // Try to open the device and if it fails, alert the user and bail out 
      if not mSerial.Open then
        MsgBox "Could not open the serial device!"
      end if
      
      
      dim mb as memoryblock//variable to hold hex data to be sent out to device.
      mb="11,22,33,44,55,66,77,88,99,aa,bb"//sample data string
      mSerial.Write( mb )//write data to device.
      
      mSerial.Close //close serial connection. Probably should have this somewhere else.

    This is basically how I plan to send the data. Like I said, I am new to these and may be missing something. The way I see it, and I may be wrong, is the VB needs the .dll file to help it communicate, where-as realbasic may have the needed functions built in?I guess I will find out, unless someone wiser than me can set me straight.

    mike

  4. #44
    Join Date
    Jul 2005
    Posts
    113
    Hi Mike

    The Processor Board that comes in our controller boxes can accept serial commands but the Public USB controller is purley USB mode.

    IT is USB packets you will be needing to send and not serial data.
    Sorry to say, not so easy.

    Regards

    Sean.

  5. #45
    Join Date
    Feb 2004
    Posts
    157
    So the HID does some sort of conversion of the data on both ends? So I either need to find a way to use the HID or find a way to send my data as USB packets? I probably sound a bit ignorant here, but I am just learning how to do serial i/o.

    If I understand this correct, I either need to be able to send my data as USB packets, or I need to be able to program my pic myself to accept serial data?

    Is there a good place to look to learn how to do this?


    thanks

    mike

  6. #46
    Join Date
    Jul 2005
    Posts
    113
    Yep Hid is generic USB Human Interface Device and the driver comes default with XP by Mircosoft. It basically means you do not have to install 3rd party drivers like other USB devices.

    Serial I/O completley different method and uses the serial port.

    The Pic has a serial UART built in and we use this on our controller box Processor Board.

    I plan on drawing up version 2 of the circuit soon and will add serial port and also jog buttons to it.

    I cannot remember If I stripped out the serial routines of the Pic Firmware or not, but still no good unless you put a RS232-TTL level converter in line with the Pic and also a serial port.

    Writing Firmware for the Pic is really easy using programs like Melabs PBP, it a basic language, but if you need to do floating point then get a handle on assembler routines also.

    Regards

    Sean.


    Quote Originally Posted by mwalach
    So the HID does some sort of conversion of the data on both ends? So I either need to find a way to use the HID or find a way to send my data as USB packets? I probably sound a bit ignorant here, but I am just learning how to do serial i/o.

    If I understand this correct, I either need to be able to send my data as USB packets, or I need to be able to program my pic myself to accept serial data?

    Is there a good place to look to learn how to do this?


    thanks

    mike

  7. #47
    Join Date
    May 2006
    Posts
    106
    how does this compare to the USB to Parallel cables sold on EBAY? http://cgi.ebay.com/USB-to-DB25-Fema...QQcmdZViewItem

  8. #48
    Join Date
    Jul 2005
    Posts
    113
    I dought if it compares at all.

    If you think about it, that device will have to monitor the I/O pins of the Printer port and then when there is a change (Pin goes High or Low) it will have to create a USB packet, handshake and send that change down to the lead which then in turn changes the pins on the end of the lead to the same state.
    This is okay if spooling a print job, but when the Pins are pulsing the stepper motors a high speeds, I cannot see this will keep up at all.

    You could try it though, but I would be amazed if it worked.

    Shame they do not show more of a spec on it.

    Regards

    Sean.


    Quote Originally Posted by leberen
    how does this compare to the USB to Parallel cables sold on EBAY? http://cgi.ebay.com/USB-to-DB25-Fema...QQcmdZViewItem

  9. #49
    Join Date
    Feb 2004
    Posts
    157
    If you are interested, I am posting questions to solve this problem on the realbasic forum.

    here is the link if you want to see,

    http://forums.realsoftware.com/viewtopic.php?t=6516


    mike

  10. #50
    Join Date
    May 2006
    Posts
    106
    I kinda figured a generic cable would not communicate well under those switching circumstances. I did find a product from IBM, a multi-port USB hub part:00n8219 that uses software to control 4usb, 1 parallel, 1 serial, mouse and keyboard. I beleive it probably uses similar principals as the ebay cable?

    Wish i had a pic programmer layin around the assembly is the easy part....

  11. #51
    Join Date
    Feb 2004
    Posts
    157
    Almost done with the RealBasic conversion of the VB files from easyHID. Also working with RealBasic to ad RB to the easyHID program. Here is the thread again if anyone is interested. I will post the RealBasic Template once it is complete.

    http://forums.realsoftware.com/viewt...r=asc&start=60

  12. #52
    Join Date
    Feb 2004
    Posts
    157

    Unhappy USB to PArallel not working

    I have made my USB to parallel port converter using the cncdudez design. I wanted a reliable PCB so I tried to draw it in eagle (my first attempt at using eagle) then sent it off to sparkfun electronics to be made. I didn't have a schematic to work from so I did my best at reverse engineering the info from the cncdudez site. I think I got it mostly, but because I was new to eagle, I had a few missing traces on my pcb. I triple checked my schematic which looked good, but I didn't noticw that some connection in the schematic were not actually connected. So I never noticed in the pcb. I know know to better check the pcb before sending off to have it made. I have since soldered jumper wires in to make up for my missing traces in an attempt to test the board and get it working so I can re-make a working PCB. However I am having some trouble.

    I was able to intermittently get windows xp to see the PCB. I had a cnc driver found message a couple times, but even when it did find it it said that there was an error with the device. I tried running the cncdudez software and it had a communication error. So it seemes I have a problem with the board. I would imagine the firmware is good as I know sean has tested it on his end.

    Does sean or anyone out there have a scematic for thsi board? Or better yet the eagle files? I would really like to have the board made as I will use it a lot, and I want a well made PCB. Here is a pic of my PCB from Spark Fun. Any help would be great, thanks.

    Mike
    Attached Thumbnails Attached Thumbnails usbcnc.jpg  
    www.bigbearcnc.com

  13. #53
    Join Date
    Jul 2005
    Posts
    442
    D+ and D- are a differential pair. From your picture it looks like you ran them around the outside of the board. This will create a large loop that picks up ALL the noise in the environment.

    Cut the traces as close to the pins as possible on both side of the connection and wire with two small insulated wires twisted together and attached on hte bottom of the board with minimum length.

    Aaron

  14. #54
    Join Date
    Feb 2004
    Posts
    157
    I bet your right. I will try what you said. I am also redoing the pcb and fixing my errors. I will post some pics of it from eagle here, then if anyone want to help make sure the board is correct I will post the finished boards files here so I anyone want to have it made they can use the files.
    Attached Thumbnails Attached Thumbnails usb-par.jpg   usb-par-brd.png  
    www.bigbearcnc.com

  15. #55
    Join Date
    Feb 2004
    Posts
    157
    Ok, here is the newest update. I have placed my traces, and I think I have it. If anyone wants to check it how, feel free. I will order this from spark fun, and if it works I will post the eagle files so others can have it made for their use. It will work with the cncdudez software and it will work with the bigbearcnc software which should release soon after I getb this board working.
    Attached Thumbnails Attached Thumbnails board-full.png   schematic.jpg  
    www.bigbearcnc.com

  16. #56
    Join Date
    Feb 2004
    Posts
    157
    Here is a zip file with the eagle files. Again, I don't know if they are 100% good.
    Attached Files Attached Files
    www.bigbearcnc.com

  17. #57
    Join Date
    Jul 2005
    Posts
    442
    Add a 0.47uF capacitor to Vusb.
    The usb D+/- lines are still routed in a loop around the power lines
    I/O line routed too close to USB D+/- lines
    90° corners on USB D+/- lines - use 45° corners

    Move C2+C3 to the sides of the crystal to allow more routing area between the PIC and the connectors.

    Push the PIC towards the top of the board to minimize trace lengths.

    Route the two data lines around the bottom (pin 21) of the PIC and approach from the inside - this will allow you to get rid of the loop. Keep the two lines as close together as possible and pour an uninterupted ground plane below them. Keep all other lines as far away as possible.

    Aaron

  18. #58
    Join Date
    Feb 2004
    Posts
    157
    wow, great info! Thanks! I will sit down with your input and re-work the design later next week.
    www.bigbearcnc.com

  19. #59
    Join Date
    May 2005
    Posts
    17
    looks nice and easy to built.thanks cncdudez.
    but can i use this interface with the softwares like Mach-2/3 or turbocnc etc.bcz iam very familiar wth these software(particularly with Mach-3) so i can't suddenly change them.
    is it possible to configure this parallel-usb interface with MAch-3?

  20. #60
    Join Date
    Feb 2004
    Posts
    157
    as of right now, no, you can use with mach2-3.

    They could write the interface as cncdudez provide the info to do so. I am writing my software to work with it.

    you can take a look at my alpha version at www.bigbearcnc.com It will not drive a machine at this point, but you can play with the interface and the dxf import function.
    www.bigbearcnc.com

Page 3 of 5 12345

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •