How do we flag a record as processed in EasyHID?


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default How do we flag a record as processed in EasyHID?

    Hi,

    I can send 30 bytes of data from the PC down to the PIC. The problem is that the logic as it is keeps processing DoUSBIn. I get my first 'good' 30 bytes, but then it keeps on trucking and keeps getting garbage.

    Do we have a flag available that we can set to indicate RECORD PROCESSED so that DoUSBIn can just sit there and wait like it did at the beginning?

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default

    I can't find a flag in the 18F2550 datasheet that would do what I want.

    What about the Byte Count in BDnSTAT and BDnCNT? Has anyone used that yet?

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default

    I found something skimming through Jan's book; ACKnowledge is a likely candidate. I'm just not really good at reading books and understanding C.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default

    Hmm, Jan mentions returning a zero length packet as an ACKnowledge. I tried this without success:


    ProgramStart:

    DoUSBIn:
    USBBufferCount = USBBufferSizeRX
    USBService
    USBIn 1, USBBuffer, USBBufferCount, DoUSBIn

    ... display USBBuffer data on LCD...

    DoACKIn:
    USBBufferCount = 0
    USBService
    USBOUT 1, USBBuffer, USBBufferCount, DoACKIn

    goto ProgramStart
    END


    Darn, this is frustrating. I'm sure it's something real easy too.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default

    Jan says that an acknowledge is part of endpoint handshaking. The 18F2550 datasheet says endpoint handshaking is disabled by default. So I tried enabling it but this register is not defined (not using this syntax anyways):

    UEP1.4 = 1

    Robert


    EDIT: Ok, I give up. I emailed Mécanique and hope they'll be able to give me an answer on Monday...
    Last edited by Demon; - 20th August 2006 at 03:24.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default

    Awe man, I'm so embarassed, I've been chasing my own tail all weekend on this problem. I'm an idiot...

    It was my VB routine all along that sent more than one transaction. I misunderstood the comment in the EasyHID generated code that said to "make sure to pass the whole array" when we write to the PIC.

    So I did, I had one write for each and every element, the PIC was just doing its job and reading everything the PC was sending.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    LMAO! maudit francais

    Now i'm sure you'll never ever made the same mistake
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. ELSEIF Block Would be Good.
    By T.Jackson in forum PBP Wish List
    Replies: 30
    Last Post: - 14th May 2007, 03:36
  2. Problem with enumeration and EasyHID
    By jizyjuice in forum USB
    Replies: 22
    Last Post: - 9th April 2007, 20:40
  3. Speed of USB EasyHID and Time problem
    By sjohansson in forum USB
    Replies: 10
    Last Post: - 18th January 2007, 22:21
  4. EasyHID and VB.net
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th September 2006, 05:40
  5. Replies: 0
    Last Post: - 5th September 2005, 09:09

Members who have read this thread : 1

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