Voici le programme que j'ai écrit, je n'arrive pas à afficher lire les données que j'ai envoyé sur le port parallele:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "DLPortIO"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
:TForm(Owner)
{
}
//ouverture du driver
void __fastcall TForm1::Button1Click(TObject *Sender)
{
DLPortIO1->OpenDriver();
DLPortIO1->Port [0x37A] = DLPortIO1->Port [0x37A] & 0xDF;
// port en sortie, bit 5 à 0
DLPortIO1->Port [0x37A] = 0x00;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
DLPortIO1->Port [0x37A] = DLPortIO1->Port [0x37A] & 0xDF;
DLPortIO1->Port [0x378] = 0x00;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
DLPortIO1->Port [0x37A] = DLPortIO1->Port [0x37A] & 0xDF;
DLPortIO1->Port [0x378] = 0xff;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{ int donnee;
DLPortIO1->Port [0x37A] = DLPortIO1->Port [0x37A] | 0x20;
// port en sortie, bit 5 à 1
donnee = DLPortIO1->Port [0x378];
Edit1->Text=donnee;
}
//---------------------------------------------------------------------------
Pouvez vous m'aider s'il vous plait merci.