Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


kiwis

832 posts

Ultimate Geek


#69178 4-Oct-2010 21:08
Send private message

I've got a 9pin serial port plug and I'm wanting to use a button to play music, seems easy enough except from a hardware point of view, say my standard button has a output wire how do I connect that to my serial port? this video says PIN 1 and 4, but why?

http://www.youtube.com/watch?v=2MlJCMdD8MU

Don't worry about the .Net I'll sort that out later, I'm just trying to get my head around the hardware stuff for now.

Create new topic
richms
28175 posts

Uber Geek

Trusted
Lifetime subscriber

  #387884 4-Oct-2010 21:10
Send private message

because there are limited numbers of handshaking likes you can read on a serial port, and those pins will be some of them.




Richard rich.ms



kiwis

832 posts

Ultimate Geek


  #387890 4-Oct-2010 21:13
Send private message

Care to explain more in detail?

Gadgetcity
26 posts

Geek


  #387912 4-Oct-2010 21:41

Basically, to detect a button press you need to apply a voltage to an input pin. 
In this case Pin 4 is the source of the voltage. (DTR is normally used to indicate when ready to receive data)
Pin 1 is the input that is read. (CD - Carrier Detect, usually reports a valid modem carrier)

The point is to use a 'signalling' input - not the received data input as this is not designed to read on/off type inputs so it would be difficult to read a button via it.

Another signalling input that could be used would be pin 9, the Ring Indicator. This is normally used to signal that the telephone line is ringing so a modem can answer it if desired.

Hope that helps 



nickb800
2716 posts

Uber Geek

Trusted

  #387922 4-Oct-2010 21:48
Send private message

kiwis: say my standard button has a output wire how do I connect that to my serial port? this video says PIN 1 and 4, but why?


What sort of button do you have? Typical buttons will have 2 terminals which would pair up to the wires from pins 1 & 4.

If your button only has one terminal, then maybe the case/ground is the other terminal.

Gadgetcity
26 posts

Geek


  #388025 5-Oct-2010 08:10

It depends on how you write your software and what action you want the button to take. If it is a button that initiates music and nothing else then you can use any button but a momentary one makes the most sense.
http://www.dse.co.nz/dse.shop/4caa1d9f00d8cfbe273fc0a87f3b0723/Product/View/P7568

kiwis

832 posts

Ultimate Geek


  #388369 5-Oct-2010 17:16
Send private message

i guess i'm looking for it to do more than just that long term it's starting point. Where can I get more info on this?

 
 
 

Trade NZ and US shares and funds with Sharesies (affiliate link).
richms
28175 posts

Uber Geek

Trusted
Lifetime subscriber

  #388398 5-Oct-2010 18:19
Send private message

Well there are 4 inputs on a serial port that can take DC signals like that, Carrier detect, Clear to send, DSR, and the ring indicate line. Ring indicate is not there on lots of devices tho since the chips to convert levels have 4 in each direction normally, so that is left out.

You need to take them between - and + 12 volt to be compliant with the specs, but simply between open and one of the other pins will work in most cases if you are happy to have false triggers with noise on the cable occasionally so you check for that in software.




Richard rich.ms

Gadgetcity
26 posts

Geek


  #388403 5-Oct-2010 18:57

It depends what info you are looking for. With regards to .NET you can easily use the PinChanged Event to monitor up to 4 buttons easily.

kiwis

832 posts

Ultimate Geek


  #389846 9-Oct-2010 11:46
Send private message

How how many buttons?
Should I really use USB with a driver?

I'm wanting to start small with a say small switch boarding to play music maybe then then work up to a model railway switchboard where from my pc I can switch tracks etc?

richms
28175 posts

Uber Geek

Trusted
Lifetime subscriber

  #389858 9-Oct-2010 13:17
Send private message

Get an arduino, between that and processing you can do what you need with many many examples targeted at artistes who are not really into hardware and coding, and both are open source too, so there are plenty of clone hardware off enay available really cheap.




Richard rich.ms

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.