QNX 6.3 x86 PC104 Driver


I’m new in QNX developing and want to write a driver for a digital-IO Modul based on the PC104 technology. I researched the internet for the PC104-DIO-48 driver and found the Universal Driver Documentation on Diamondsystems.com. Is this the right way or can you give me any other links?


Lucky for you these are probably the easier driver to write. I don’t know about the Universal Driver Documentation, but the chip on these board is usually a 8255, so look up the specs of 8255 and you shoudl be ok

Hey mario,
thank you for your help, i looked up the datasheet of the 8255, read about the memory allocation and found suddenly out, that i wrote the reserved memory. I changed the memory allocation and now i can write on the IO-Module. Here you will find my sourcecode:

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/neutrino.h>
#include <pthread.h>
#include <time.h>
#include <hw/inout.h>
#include <sys/mman.h>
#include <inttypes.h>

int main(int argc, char *argv[])
//Depending on the jumper positions
int BaseAdress = 0x350;
int ret;
uintptr_t port_ctl, port_data;

ret = ThreadCtl(_NTO_TCTL_IO, 0);
if (ret==-1)
	printf("NO PERMISSION\n");
	printf ("ThreadCtl-ret = %d\n",ret);


  • Setting the control-Reg
    port_ctl = mmap_device_io(0x01, BaseAdress+3);
    if (port_ctl==MAP_DEVICE_FAILED)
    printf(“mmap_ctl failure\n”);
    out8 (port_ctl,0x89); // A: IN , B: OUT

  • Defining IO-of the Ports

    port_data = mmap_device_io(0x01, BaseAdress);
    if (port_data==MAP_DEVICE_FAILED)
    printf(“mmap_data failure\n”);


  • Simple toggling of Port A
    printf(“Setze LED\n”);
    out8(port_data, 0xFF);

    printf(“Loesche LED\n”);
    out8(port_data, 0x00);





You got the hardware working, now you need to turn this into a driver ;-)

Hey mario!
On the embedded world 2006 in Nürnberg, Germany i was speaking with the official QNX-Support team, who told me, that i should not concetrate on writing a charakter driver, instead I should write a resource manager! so I search through the Neutrino programmers guide and found a source example! In this source example there is the framework descriped, and you only have to write the handlers! can you give me some informations about implementing the handlers?

have a nice day

yours muhkuh


I’m new… For my work, they asked me to do a driver for the TS-5600 PC/104 :

I have to develop a driver for the analogic I/O and I really don’t know how to begin it … I have Momentix & SP2 installed, I also instaled the DDK, but I don’t know how to do the driver… Can somebody help please :blush: ?

Thanks :confused:

Hey guy,

you have to write a resource manager, then you can access the io modul by low level instructions ala open close read write! when you pack it into a library you can create your own commands ala set byte set bit and so on!

yours muhkuh

hi muh,
I am new into qnx,
how are you mapping open, read & write into the driver,I dont understand the concept of resource manager I have done character drivers that in linux kernel space, this user level driver resource manger i dont understand.

Can you give me any document or url saying how you have done your driver or just put the code on to here,

  1. How API open,read,write& close are mapped
    2.How some code is recognized as driver
    3.Is there any difference in compiling a driver & a normal code

1 . Look in QNX documentation. Search for the chapter on Writing a resource manager
2 - 3. As far as QNX is concern there is no real difference between a driver and normal code.