gorgom WROTE:I need to use interrupt when the PS2 controller button is pushed. Can anybody show me the example hi-tech C code?
gorgom WROTE:thanks shahrul.
static void interrupt isr(void)
{
if(RCIF==1) status[DATA]=RCREG;
}
From the interrupt function above, can you explain status[DATA]=RCREG; instruction more detail because the declared variable is unsigned char DATA,status[31];. Sorry, I'm quite new with PIC.
if(DATA<28) DATA++;
else DATA=0;
uart_transmit(DATA);
gorgom WROTE:Thanks. I get it now. There is int read_a2d(unsigned char channel); function in the provided source code. But it seem not use in the main program. Can I just delete the function.
Users browsing this forum: No registered users and 4 guests