Malli510
Newbie level 3
As i want control a led light
i attached it's +ve to D-0 and negative to ground pin in parallel port
the led glows when system boots up
and i have written my program in c#.net
as below
when i run the program it shows no error and runs fine but the led is not glowing
can anyone plz help ..me
thanks in advance;
i attached it's +ve to D-0 and negative to ground pin in parallel port
the led glows when system boots up
and i have written my program in c#.net
as below
Code C# - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 using System; using System.Runtime.InteropServices; public class PortAccess { [DllImport("inpoutx64.dll", EntryPoint = "Out32")] public static extern void Output(int adress, int value); [DllImport("inpoutx64.dll", EntryPoint = "Inp32")] public static extern int Input(int adress); } and i place my inpoutx64.dll in C:/windows/system/ C:/windows/system32/ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { public static void Main(string[] args) { int address = 888; int value; PortAccess.Output(888,255); value = PortAccess.Input(address); Console.WriteLine(value); PortAccess.Output(888,0); Console.ReadLine(); } } }
when i run the program it shows no error and runs fine but the led is not glowing
can anyone plz help ..me
thanks in advance;
Last edited by a moderator: