PC-usb-PIC problem...


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default PC-usb-PIC problem...

    Hello

    I have quit a strange problem I can't solve
    Please take a look at the attached files.

    One is the interface running on my PC the second the PIC 4550 pbp code. The origins are outcomes from easyHID.

    All works quit well now when line 45 in pbp code is commented. When things are as you can see them now you can see the same number in the second window (x2=) as in the upper one that is sent to PIC to by pressing Send. You can also see the portA.2 toggle on each Send press. Nothing wrong now.

    But what if you uncomment line 45 and assign 77 to USBBuffer[1], you could expect to see 77 in the second textbox. But that is not the case. You will still see the same number that is in the upper textbox and you can see portA toggle on each Send press. It seems that PIC ignores the uncommented line 45.

    How can this be explained?????
    Can you explain this?
    Please do, if you can

    Please help.......

    I'm using XP and pbp 2.50b (and portB.5 is connected to USB+5V, so we wait there and see the toggling before the USB cable is connected)
    Attached Images Attached Images  
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    This would help to see the PC software as well.

    try to skip DoUsbIn and just do a loop of DOUSBOut.

    Never Forget, array index 0 on the PIC side is INDEX 1 on the PC side,
    Steve

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

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    This would help to see the PC software as well.

    try to skip DoUsbIn and just do a loop of DOUSBOut.

    Never Forget, array index 0 on the PIC side is INDEX 1 on the PC side,
    Attached pc-software. Will try the skipped DoUsbIn as soon as the batteries are charged again... forgot them for a too long time on, so they need to be charged
    Attached Files Attached Files
    Last edited by keymuu; - 9th November 2008 at 21:04.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    ... Never Forget, array index 0 on the PIC side is INDEX 1 on the PC side,
    You should never say never...
    That was the problem here, thanks mister_e for the "never... "...
    However, this brings up another issue, if PC buffer[0] is always report ID as stated in VB-program, how could one send that info to the PIC if needed?

    A second question, do you now a good pic2550/4550 assembler tutorial somewhere around the wep? I have been trying to look around such tutorials but haven't been so lucky yet

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


    Did you find this post helpful? Yes | No

    Default

    Well you just send it to your pic, the same way i use for the PWM Scroll bar in my USBDemo... not sure how handy it is to send it though

    I don't know of any good asm tutorial, but as Darrel says elsewhere, the datasheet, and the reference guide for 18F familly is usually more than enough.
    Steve

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

Similar Threads

  1. Reading a slave USB with a pic
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th October 2008, 12:00
  2. Forward Serial Data from pic to pc
    By Muller in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 2nd September 2008, 21:46
  3. PIC to PIC communication problem
    By precision in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st June 2007, 03:51
  4. PIC to USB
    By Christopher4187 in forum General
    Replies: 5
    Last Post: - 26th February 2006, 13:08
  5. PC - PIC problem...
    By menhwa in forum Serial
    Replies: 2
    Last Post: - 20th February 2006, 19:57

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