gvanto
Member level 1
dev c++ parallel port programming
I am trying to use the following code (which I found from a dataloggin article, https://www.phanderson.com/printer/ltc1392/ltc1392.html) to output a simple byte onto my parallel port. I am using Dev-Cpp under WinXP. The compiler gives an error saying "outportb undeclared function" - I thought I had included the right header files...
I am trying to build a simple function generator / audio output device based on the article by this finnish guy:
**broken link removed**
he has supplied the hardware for it but the software i would like to write myself in Dev-Cpp if possible (should be I would have thought)...now, how to access that parallel port...
any help very appreciated...
- - - - - - - - - - - - - -
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <dos.h>
#define DATA 0x0378
using namespace std;
typedef unsigned char byte;
byte data = 0x00; /* note that data is global */
int main(int argc, char *argv[])
{
data = 0x04;
outportb(DATA, data);
system("PAUSE");
return EXIT_SUCCESS;
}
I am trying to use the following code (which I found from a dataloggin article, https://www.phanderson.com/printer/ltc1392/ltc1392.html) to output a simple byte onto my parallel port. I am using Dev-Cpp under WinXP. The compiler gives an error saying "outportb undeclared function" - I thought I had included the right header files...
I am trying to build a simple function generator / audio output device based on the article by this finnish guy:
**broken link removed**
he has supplied the hardware for it but the software i would like to write myself in Dev-Cpp if possible (should be I would have thought)...now, how to access that parallel port...
any help very appreciated...
- - - - - - - - - - - - - -
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <dos.h>
#define DATA 0x0378
using namespace std;
typedef unsigned char byte;
byte data = 0x00; /* note that data is global */
int main(int argc, char *argv[])
{
data = 0x04;
outportb(DATA, data);
system("PAUSE");
return EXIT_SUCCESS;
}