Simple Maths Going Wrong - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 44 of 44
  1. #41
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Cdc??

    Quote Originally Posted by Darrel Taylor View Post
    If you use USB as CDC, it looks just like a COM port to the PC.

    You should be able to convert any SEROUT's to ARRAYWRITE's, then send the array out USB to StampPlot.

    Or you can send CSV text using CDC and capture it to a file with HyperTerminal.
    Then import to excel.
    Thanks for your input Darrel. Unfortunately the reason I need to use a USB interface is the the user of this only has a laptop that doesn't have a serial port....only USB port. If I did it as a USB CDC on the PIC side, wouldn't he have to use one of the USB to Serial adaptor cables....which I know from experience don't always work that well.

    I did Google an article on CDC since I didn't know anything about CDC that says it "...describes the Microchip PIC32 USB CDC serial driver and acts as a programmer's guide for developers wishing to adapt it to their own application." However, I am using 18F2550/4550 chips so don't know whether that would apply.

    It took me a few weeks to understand your adaptation of Mister-E's HID with your DT-HID/USB interface well enough to even get it to work....and although I have fairly well mastered the PIC side of the USB interface, the VB6 HID side is still pretty much a mystery to me. So I am looking for an easier way to do the PC side of a USB interface if that is possible??? StampPlot looked like such an approach, but if I can't use USB with it I guess I have to pass on it.

  2. #42
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Darrel

    Using ARRAYWRITE for such uses causes me some trouble when using STR\n ...

    as Manual states on p.54

    The length is determined by the count ,less than 256 OR when a "0" is encountered in the string
    quite annoying for sending numbers as strings ... as you can see it in the DT_USB Demo you showed us i.e. . ( in the right window, strange numbers appear ... )

    do you have a fix or turnaround for that ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #43
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/showthread.php?t=5806
    Might help you out. The PC will see the USB connection as a virtual serial port.
    Dave
    Always wear safety glasses while programming.

  4. #44
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jellis00 View Post
    Thanks for your input Darrel. Unfortunately the reason I need to use a USB interface is the the user of this only has a laptop that doesn't have a serial port....only USB port. If I did it as a USB CDC on the PIC side, wouldn't he have to use one of the USB to Serial adaptor cables....which I know from experience don't always work that well.
    No, not at all.
    You connect it to the PC's USB bus, just like you would with HID.
    But to the PC it looks like a COM port. So just about any PC program that works with RS232 will work with USB.

    Squibcakes started this thread on CDC ...
    USB CDC Communications for Dummies!
    http://www.picbasic.co.uk/forum/showthread.php?t=5806

    I added an update for 2.60 with a servicing routine ...
    http://www.picbasic.co.uk/forum/show...0301#post80301

    The USB_ASM_SERVICE isn't compatible with DT_INTS, but the handler is, so it will be easy to modify, since I already know you're using them.
    DT

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  3. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  4. what's wrong 16F877A simple code?
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th October 2009, 01:11
  5. Doing Simple Math - getting the wrong answer
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2005, 14:27

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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