Go to Post Whether or not you use wheel weights, if you're running a wheel at several thousand RPM, you'd better have an effective containment system to protect the outside world in case something spontaneously disassembles itself. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 26-01-2009, 15:45
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Digital Outputs on the Driver Station with C/C++

Here's how to quickly calculate what resistor you should use for your LED. You will need to know the current consumption of the LED and the forward voltage of the LED (when a diode turns on, it more or less maintains a constant voltage accross itself). The relationship between current, resistance and voltage is defined in Ohm's law, V = IR (where V is voltage, I is current and R is resistance).

Vf = forward voltage of the diode
Id = diode current

The voltage supplied by the digital I/O port is 5V.

Since the diode and resistor are in series, they will have the same current flowing through them.

This means that the voltage accross the diode added to the voltage accros the resistor must equal 5 volts. Thus, 5V = Vf + (Id * R).

or R = (5V - Vf ) / Id

Hope that's a help as well...
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using driver station digital inputs Japper FRC Control System 6 19-01-2009 20:01
Flashing Driver Station Digital Input MacGyver1718 FRC Control System 3 15-01-2009 19:22
Timing with the Driver Station Zorkinian Programming 6 10-01-2009 09:42
Help with updating firmware on Driver Station urg8rb8 FRC Control System 3 28-12-2008 02:53
Interrupt on driver station digital input Nameless Programming 9 04-12-2008 16:55


All times are GMT -5. The time now is 13:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi