New project - MSFS C++ USB interface


+ Reply to Thread
Results 1 to 40 of 170

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    It would figure that the very next day that I send my order, I find an even better way to debounce pushbutton switches using 74HC14 ICs. I hadn't seen this one before. I had only seen the RC design. Oh well, live and learn.

    https://hackaday.com/2015/12/09/embe...uttons-part-i/


    About not knowing which brand or specs of components used by JLCPCB; I scan their database for components IN STOCK using search parameters like RESISTOR 1206 10K 250MW then sort their output on descending price.

    https://jlcpcb.com/parts/all-electronic-components


    I looked for a known brand and picked their component with the lowest tolerance percentage; I used Yageo for this project (mainly cause it's the only one that I recognized).
    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
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Many MCU now have implemented schmitt trigger on their inputs. Maybe this helps ditch the extra chip?

    Also software debounce costs nothing but little time to program, right?

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Thing is, my buttons leads to I/O expenders, and then all the I/O expanders to the MCU. They first IOE I looked at didn't have schmitt triggers on all inputs.

    And honestly, I really preferred to limit extra processing on the MCU and concentrate on USB, and servicing the IOEs. I didn't feel like adding logic for debouncing if at all possible.

    The 74HC14 may cost a few pennies, but it should help clean up the signals to the IOEs.
    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
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Well, I understand the case. With the I/O expanders things are different.

    A very good debouncer is desribed in the second part of the article you post. Really neat and ultra fast technique with very low MCU load.

    https://hackaday.com/2015/12/10/embe...ttons-part-ii/

    But amazing things can a capacitor do! In most cases, with relatively good switch, a series resistor from the switch to the input and a small increase in the capacitor, that is in parallel with the input to the ground, is enough. Used that many times and with rotary encoders too with great results.

    The secret is to use that resistor R1 in the following design, to "isolate" a bit the switch from the capacitor.

    Name:  debounce-sch.jpg
Views: 7260
Size:  34.9 KB

    Ioannis
    Last edited by Ioannis; - 12th January 2024 at 09:09.

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    That software technique of using the last status of the pin (01111111) looks nice on paper, except I'm going to have nearly 100 "controls" (pushbuttons, rotary switches, rotary encoders and rotary potentiometers) on this basic project. And future versions of this project is going to have a truckload more. That's why I'm trying to stay on hardware solutions if at all possible.

    I put in 3 orders to JLCPCB so far. Really looking forward to see the end result in person.
    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!

Similar Threads

  1. USB interface
    By Frozen001 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th December 2011, 20:37
  2. Host for USB interface?
    By Carrasco in forum Off Topic
    Replies: 4
    Last Post: - 4th August 2007, 00:59
  3. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 17:04
  4. USB interface from PIC16F877 to PC
    By headshouter in forum USB
    Replies: 0
    Last Post: - 26th February 2006, 05:58
  5. USB project
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th January 2005, 22:59

Members who have read this thread : 7

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