steve30 wrote:
I have been fiddling about with the parallel port on my PC recently as I will be making use of it for my college project this year. I've only managed to get it to switch LEDs on and off using Microsoft's QuickBasic.
Does anyone know where to start using the Amiga to switch LEDs on and off with the parallel port?
Cheers
Steve
Parallel Port ?
Quickbasic ?
In a college Project ?!
One should expect modern HArd and Software on a college ...
Here is some Info about parrellel programming on the Amigahere is an example program:
#include
#include
#include
#include
int main(int argc, char *argv[])
{
struct IOExtPar * Parallelport;
struct MsgPort * ParallelMsgPort;
BYTE Returnvalue;
if(ParallelMsgPort = CreateMsgPort())
{
if(Parallelport = (struct IOExtPar *) CreateIORequest(ParallelMsgPort, sizeof(struct IOExtPar)))
{
Parallelport->io_ParFlags = PARF_SHARED;
}
else
{printf("CreateIORequest failed\n");}
}
else
{printf("CreateMsgPort failed\n");}
printf("Open Parallelport...\n");
Returnvalue = OpenDevice("parallel.device",0L,(struct IORequest *)Parallelport,0);
if(Returnvalue == 0)
{
printf("Opening Parallel Port successful\n");
}
else
{
printf("An Error accured.\n");
}
printf("Press any key to send Data...\n");
Parallelport->IOPar.io_Length = -1;
Parallelport->IOPar.io_Data = (APTR)"Parallel lines cross 7 times...";
Parallelport->IOPar.io_Command = CMD_WRITE;
DoIO((struct IORequest *)Parallelport);
printf("Any key to quit...\n");
getchar();
CloseDevice((struct IORequest *)Parallelport);
DeleteMsgPort(ParallelMsgPort);
DeleteIORequest((struct IORequest *)Parallelport);
printf("Any key to quit...\n");
getchar();
return Returnvalue;
}