Menu

Two software UARTS interfere ...

2021-01-15
2021-01-17
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-01-15

    Unfortunately, Hello again ...

    I wanna add a voice control to my railroad layout. The project (presently standalone on a STK200, not yet embedded into the layout's calculator) should :
    - Recognize an expression among seven via Elechouse's SimpleVR (meanwhile I found a vocabulary which makes it reliable) ; if it recognizes a word it sends via serial1 (PinC.2) the byte 0xAA, followed by 8 bytes, the fifth being the index of the recognized word. I must have the possibility to abort the recognition (Pin7 of PortD = 0), so the "Recog" routine is not simple : I must wait if either PinD.7 or PinC.2 goes low.
    - Say an expression via the Parallax Emic2, connected to Ser2. When finished, the Emic responds via a byte.
    It seems that in fact both serials interfere, the recognition does no more work : I "cancelled" the waiting function for Emic (line 57) and disconnected it : the system worked again perfectly, with the Simple VR connected to Pin2 of portC. Now I connected it to Pin0 : THE RECOGNITION WORKED TOO ! Everything happens as if the system would confuse both pins, they become equivalent ! I had the same issues using PortD, so it's not a hardware problem. And the same "feature" appears on Mega162 ...
    I wrote another version, using the EasyVR3 with only one serial on pins 0 and 1 (the EasyVR3 has a built in sample player for response), the system works perfectly ; unfortunately the EasyVR3 is speaker dependent and needs training, there is a speaker independent mode but to use it with a custom vocabulary one must buy a (about) 150$ licence for the "customization" prog !

    PANIC !!!!!

     

    Last edit: Bertrand BAROTH 2021-01-16
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-01-16

    Shame to me : I suspected an issue in the processor or the board ; in fact a wire, as thinner than a hair, made a short circuit in a plug ... Sorry for the inconvenience, errare humanum est. Murphy is great !

     

    Last edit: Bertrand BAROTH 2021-01-16
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-01-16

    Problem solved, it was hardware ... Fortunately no circuit got damaged (2 outputs connected together, hummm ... )

     

    Last edit: Bertrand BAROTH 2021-01-16
  • William Roth

    William Roth - 2021-01-17

    I was watching this thread but had nothing much to offer.

    Glad you found the problem. Hair sized shorts are difficult to see. With my poor vision I think I am gonna order one of those cheap 7 " digital microscopes for inspecting stuff.

     
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-01-17

    In fact, even after I noticed with my multimeter that there was a short circuit in plug, I didn't see anything . I had to move a thin rod between the pins to remove it.
    BTW the SimpleVR is not very reliable, it detects any ambient noise and interprets it as the "nearest" word, even with a head-worn Shure mike. And EasyVR3 can go "checkmate" by noise, too, one has to shout ! Finally I think that speech recognition has nothing to do with model railroading, it would only impress Youngsters who are already "Siri nerds" ; in my youth I had much fun with pushing switches on my Märklin HO layout. The only advantage of a modern sequencer is that one cannot forget to flip a turnout into the right position (especially while he explains details of the landscape to visitors ! ) and that the trains stop at the corresponding place, so derailments and other accidents are rather rare and this is important with Z scale ; so I will keep my console with the digitasts and the sequencer prog running on 90S8515 : in the past I bought a "stock" of 10 on the Bay, I need 28 I/O lines !

     

    Last edit: Bertrand BAROTH 2021-01-17
  • stan cartwright

    stan cartwright - 2021-01-17

    I have hserial out device and want to use the terminal but got nowhere using usart1.
    all complicated

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.