Hey guys, just wondering if anyone here has any experience programming Moxa devices? Basically I have a Debian box which runs my little serial program fine (all it does is ouput to a serial port) however when I tried it on the Moxa I can't get it to work at all! It compiles fine and I'm sure I'm using the correct ports.
Here's a snipplet of the code:
Having looked around I have found several ways of doing this, however this way just seemed the simplest! I tested it by outputting to a Windows laptop (Hyperterminal) and it works perfectly fine. I just can't get the ports on the Moxa to do anything at all!Code:portno = 0x98200000; // Use ttyS0 ioperm(portno, 1, 1); // Allow read and write access // Main program for (i=0; i<outdatalen; i++) // oudatalen is the length of the outgoing data string { outb(outdata[i], portno); usleep(waittime); } // Rest of the program
Thanks for any help,
pgcrooks



LinkBack URL
About LinkBacks


