Phone:(705) 671-2652
    Fax:(705) 671-6127
   Email: tom@ontrak.net
Home Products Programming Applications Custom Designs Ordering News
    
Driving LED's With Digital I/O Lines

LED's may be driven by digital I/O lines and require only a current limit resistor to limit current to 20mA or less. Digital I/O lines can source ( LED 1) or sink ( LED2)   LED current. If the I/O line is to sink LED current, the "RESPAn" command is used to turn the LED on and the "SETPAn" command is used to turn the LED off.. If the I/O line is to source LED current, the "SETPAn" command is used to turn the LED on and the "RESPAn" command is used to turn the LED off. The following example shows the use of anADR101 to control two LED's in each of the before mentioned configurations.

LED.gif (16946 bytes)

10 OPEN "COM1:9600,N,8,1,CS,DS,RS" AS#1
20 PRINT#1, "CPA11111100"
30 REM TURN ON LED#1
40 PRINT#1, "SETPA0"
50 REM TURN OFF LED#1
60 PRINT#1, "RESPA0"
70 REM TURN OFF LED#2
80 PRINT#1, "SETPA1"
90 REM TURN ON LED#2
100 PRINT#1, "RESPA1"
110 BEEP
120 GOTO 30          

 Back to Applications Page

 
    
Contact Information
Address Telephone Electronic Mail
Ontrak Control Systems Inc.
764 Notre Dame Ave., Unit #1
Tel: (705) 671-2652 General Information Sales or Support
Sudbury,Ontario Fax:(705) 671-6127 tom@ontrak.net
CANADA P3A 2T2    
              
Next-Day shipping anywhere in Continental U.S. via Fed-Ex
Copyright 2012 ONTRAK CONTROL SYSTEMS 764 Notre Dame Ave, Unit #1 , Sudbury, Ontario, CANADA P3A 2T2  
"Quality serial Data Acquisition Interfaces"           PH. (705) 671-2652 FAX (705) 671-6127