Trigger an Interrupt

I have attached a 82C54 timer board to the x86 board running my QNX 6.2 OS.

I was wondering if someone could post a sample code to program the 82c54 timer to generate interrrupts.

Thanks
ashu

That chip is unbeleivably simple to program, google it up.

Plus each board may have a different way to generate interrupt (some have special register to controle interrupt if there are multiple 82C54 board)

the x86 board that I am using also has a 82C54 chip, but I am now using a seprate Timer Chip “PCM-CTC” . The reason was that when i was using the x86 boards inbuilt timer, by increasing the Frequency I was also increasing the rate of the speed of the system clock.
Do i really need to use a separate chip to solve my problem or i could have a way around it without having to buy those additional Timer chips. If yes, how ?

Another question just poped up my head. Whenever we attach a chip/board to a processor How could i test if the attached chip/board. I mean i could program that new attached chip but how would I know if I am being able to write to it and that I am not writing to Nowhere ??

Thanks

This is anwer in another thread.

That depends on the hardware, you have to find a way to test the presence of the hardware. If the board is PCI you usually the the address from the BIOS so it’s fairly safe to assume it’s really there. If it’s ISA you have no clue.

For a chip timer, it’s fairly simple, you find a register that you can write a value in and then read it back. If it’s not the same you got a problem. If it’s the same you go on the second test which is program it and read back the counter to see if they change, and then finally you make sure you are getting interrupts.

You have to get creative !

thanks for the responses … now i can successfully change the ClockPeriod() and generate interrupts at faster rates.
well now my question is that the interrupt i generate using the timer, does it have the highest priority ? If not, can i make it have the highest priority ? if yes, how could i do that.

thanks
ashu