P2 Hosted USB Keyboard/Mouse

2»

Comments

  • garryj wrote: »
    I don't yet have revb silicon to test with but, as @RossH said, the demo code does have commented out code that sets the revb smart pin mode. Switching to the alternate wrpin and wxpin settings should satisfy the revb USB NCO configuration

    ...
    Here is also a link to Chip's post regarding an additional step he had to implement to get it working:
    https://forums.parallax.com/discussion/comment/1475565/#Comment_1475565

    Thanks Garry. Tried all that. No luck. I'm actually beginning to wonder whether my RevB board might be faulty. :(

    Hopefully someone else will try it for us.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • jmgjmg Posts: 14,019
    RossH wrote: »
    garryj wrote: »
    I don't yet have revb silicon to test with but, as @RossH said, the demo code does have commented out code that sets the revb smart pin mode. Switching to the alternate wrpin and wxpin settings should satisfy the revb USB NCO configuration

    ...
    Here is also a link to Chip's post regarding an additional step he had to implement to get it working:
    https://forums.parallax.com/discussion/comment/1475565/#Comment_1475565

    Thanks Garry. Tried all that. No luck. I'm actually beginning to wonder whether my RevB board might be faulty. :(

    Hopefully someone else will try it for us.

    If Chip has verified P2 ES2 code, maybe he can post that for you to check ?

    Did you check D+/D- connection ? ISTR some chatter around leaving off USB Data resistor-jumpers on the P2-USB connector (to avoid confusing power supplies, in alarming ways...)
  • jmg wrote: »
    Did you check D+/D- connection ? ISTR some chatter around leaving off USB Data resistor-jumpers on the P2-USB connector (to avoid confusing power supplies, in alarming ways...)

    I think you are probably talking about the on-board USB ports. I am using the 64006-ES USB Host adaptor board, and this works on the RevA board. I have also tried it on different pins on both boards, in case some individual pins were faulty. So I don't think that would be it.

    If Chip could post his modified code (which apparently works) that might help identify the problem. Very likely there is some other change he has made to Garry's code that he forgot to mention.

    Ross.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • RossH wrote: »
    jmg wrote: »
    Did you check D+/D- connection ? ISTR some chatter around leaving off USB Data resistor-jumpers on the P2-USB connector (to avoid confusing power supplies, in alarming ways...)

    I think you are probably talking about the on-board USB ports. I am using the 64006-ES USB Host adaptor board, and this works on the RevA board. I have also tried it on different pins on both boards, in case some individual pins were faulty. So I don't think that would be it.

    If Chip could post his modified code (which apparently works) that might help identify the problem. Very likely there is some other change he has made to Garry's code that he forgot to mention.

    Ross.

    I've looked and I can't find it. I must have deleted it after I mod'd it and proved it. One problem was that the version of PNut that I'm using has different operators, like |< is now DECOD, and >< is now REV. I remember that all I had to do was change the operators and comment or uncomment some line that selected the Rev B silicon. Once I did those things, it worked fine.
  • cgracey wrote: »
    I've looked and I can't find it. I must have deleted it after I mod'd it and proved it. One problem was that the version of PNut that I'm using has different operators, like |< is now DECOD, and >< is now REV. I remember that all I had to do was change the operators and comment or uncomment some line that selected the Rev B silicon. Once I did those things, it worked fine.

    I don't think it can be because of the operators, because the same operators (which are not used in the Rev B specific code sections anyway) work on the Rev A board when compiled by PNut_v33k.

    Perhaps your internal version of PNut has another difference?

    Otherwise, I'm a bit stumped :(
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • evanhevanh Posts: 8,072
    edited 2019-11-03 - 05:02:20
    I've just given the fastspin compiled version with dual port support a run up on both revA and revB Eval boards. On revA I can plug a mouse in either port and get a readout of position no issue.

    Swapping the commented section and change from -2a to -2b compile option in fastspin, on revB I get the following:
    Sysclock: 160000000, baudrate: 115200
    Tiny client + USB low/full speed keyboard/mouse v0.02.
    USB1 cogID: 1, event pin#: 16, version: v0.05
    USB2 cogID: 2, event pin#: 17, version: v0.05
    
    Which is the same initial messages as revA ... but revA has more, reporting a mouse connected and so on.

    "We suspect that ALMA will allow us to observe this rare form of CO in many other discs.
    By doing that, we can more accurately measure their mass, and determine whether
    scientists have systematically been underestimating how much matter they contain."
  • RossHRossH Posts: 4,494
    edited 2019-11-03 - 05:08:22
    evanh wrote: »
    I've just given the fastspin compiled version with dual port support a run up on both revA and revB Eval boards. On revA I can plug a mouse in either port and get a readout of position no issue.

    Swapping the commented section and change from -2a to -2b compile option in fastspin, on revB I get the following:
    Sysclock: 160000000, baudrate: 115200
    Tiny client + USB low/full speed keyboard/mouse v0.02.
    USB1 cogID: 1, event pin#: 16, version: v0.05
    USB2 cogID: 2, event pin#: 17, version: v0.05
    
    Which is the same initial messages as revA ... but revA has more, reporting a mouse connected and so on.

    I haven't tried the dual port version on Rev B. I'll do that now.

    Done: Same result :(
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • evanhevanh Posts: 8,072
    edited 2019-11-03 - 05:09:57
    I edited the baud down to 115200 and had to go find the SmartSerial source code ... found it in spin2cpp include files.

    "We suspect that ALMA will allow us to observe this rare form of CO in many other discs.
    By doing that, we can more accurately measure their mass, and determine whether
    scientists have systematically been underestimating how much matter they contain."
  • evanh wrote: »
    I edited the baud down to 115200 and had to go find the SmartSerial source code ... found it in spin2cpp include files.

    Yes, I had to get a copy of that file as well.

    I am somewhat relieved that it doesn't seem to be just my board! :)

    Ross.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • Solved!

    The RevB board has a jumper that says ACC HDR 5V. I never noticed that the jumper was not actually installed - D'oh! :(

    USB drivers (both one and two port) now working as advertised on both RevA and RevB boards!

    Thanks, Garry!
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • Whew!
  • Oh yeah removing that 5v jumper *would* do that. Its a feature : )
  • Ha! Good find. That jumper is off, for good reason, by default on the revB boards.
    "We suspect that ALMA will allow us to observe this rare form of CO in many other discs.
    By doing that, we can more accurately measure their mass, and determine whether
    scientists have systematically been underestimating how much matter they contain."
  • evanh wrote: »
    Ha! Good find. That jumper is off, for good reason, by default on the revB boards.

    Under what circumstances would you not want it installed?
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • When you are probing around the board near the breakout board pins and are worried you might short the 5V to a signal pin. It would be an easy thing to do by mistake. It's handy to have this jumper as a protection, but you do need to remember to install it when you want the 5V.
  • Yahoo! ! It was a bit of a bummer being mostly helpless in trying to get this solved.
    garryj
Sign In or Register to comment.