element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Dev Tools
  • Products
  • More
Dev Tools
Forum USB Mouse Project
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Dev Tools to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 80 subscribers
  • Views 826 views
  • Users 0 members are here
  • usb
  • mouse
Related

USB Mouse Project

admsteck
admsteck over 11 years ago

Here is my project.  There is a website which helps you learn morse code (lcwo.net) and one of the features they have is a morse to text converter.  This allows you to tap out morse code using the mouse and it will convert to text.  For a more realistic experience, I would like to be able to use a real telegraph key.  My thought is to use a small microcontroller to provide the usb interface and I would only need one button and none of the x, y, or scroll.

 

I have no experience with microcontrollers and wanted to know which would be a good fit for this application.  I found a few PDFs that discuss using an atmel avr for a usb mouse application, but they focus primarily on the usb side of things and not the hardware.  I thought of buying a cheap usb mouse (all the extras I have are ps2), but I though this would be a good challenge and introduction to microcontrollers.  Thanks.

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 11 years ago +1
    Hi Adam, One fairly easy way to do this is to take apart a mouse and hook your keyer in parallel with the mouse button. Another way is to get a HID controller and hook up your keyer to the mouse button…
Parents
  • Former Member
    0 Former Member over 10 years ago

    That's a cool idea, and Joshua Bayfield's idea of using a Teensy also sounds like an interesting idea.  As far as what happens electronically (or more correctly electromechanically) when you press the mouse button it activates a tactile switch that sends a Voltage High signal across the USB connection to the controller (most are made by FTDI).  Hooking a 25-cent push-to-make tactile switch to a digital input on the uC is really all there is to that end of the hardware.  Your code would have to poll the input to detect when the button went high.  Just an example; in an Arduino this would be the DigitalHigh event.

    Having said that; if you want to use an Arduino, you might need to use a Due.  That board has an FTDI controller on the PCB to pass USB protocol signals.  Not having done this myself on a website I would encourage you to go to one of the forums for whatever uC you decide on.

    You will have to experiment with how the coding is implemented on the website.  Many computer languages have a variant on click-down (mouse button is pressed) and click-up (mouse button returns to open state) commands.  Most coders will use the click-up event.  That's why you can press the mouse button and it won't do anything until you release the button.  I'm guessing that's the case for this website; as it would need some way to distinguish timing between a dot and a dash.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 10 years ago

    That's a cool idea, and Joshua Bayfield's idea of using a Teensy also sounds like an interesting idea.  As far as what happens electronically (or more correctly electromechanically) when you press the mouse button it activates a tactile switch that sends a Voltage High signal across the USB connection to the controller (most are made by FTDI).  Hooking a 25-cent push-to-make tactile switch to a digital input on the uC is really all there is to that end of the hardware.  Your code would have to poll the input to detect when the button went high.  Just an example; in an Arduino this would be the DigitalHigh event.

    Having said that; if you want to use an Arduino, you might need to use a Due.  That board has an FTDI controller on the PCB to pass USB protocol signals.  Not having done this myself on a website I would encourage you to go to one of the forums for whatever uC you decide on.

    You will have to experiment with how the coding is implemented on the website.  Many computer languages have a variant on click-down (mouse button is pressed) and click-up (mouse button returns to open state) commands.  Most coders will use the click-up event.  That's why you can press the mouse button and it won't do anything until you release the button.  I'm guessing that's the case for this website; as it would need some way to distinguish timing between a dot and a dash.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube