> hi all!
> here i am doing a project project using Fujitsu
> Controller(MB90F428).first i have wriiten the test coding for UART
> communication. if i use polling my coding is working but interrupt is
> not working. here is my code
>
> #pragma intvect Int_Uart1Rx 37 // UART1 RX
>
> void Main()
> {
> IO_ICR13.byte = 0x00;
> IO_DDR0.bit.D03 = 0;//Input port
> IO_DDR0.bit.D04 = 1;//output port
> IO_SMR1.byte = 0x11;
> IO_SCR1.byte = 0X13;//Tx,Rx enabled
> IO_SSR1.byte = 0x0A;
> IO_CDCR1.byte= 0x80;
> IO_SSR1.bit.RDRF = RESET;
> while(1);
> }
> /****************************Interrupt Routine*************/
> __interrupt void Int_Uart1Rx(void)
> {
> if(IO_SSR1.bit.RIE == ON)
> {
> if(IO_SSR1.bit.RDRF == ON) // if "UART1 has received" interrupt
> {
> IO_SSR1.bit.RIE = OFF; // interrupt disabled
> Rx_VALUE = IO_SIDR1.byte;
> if(IO_SSR1.bit.RDRF == RESET)
> IO_PDR7.bit.P75 = LED_ON;
> IO_SSR1.bit.TDRE = SET;
> IO_SCR1.bit.REC = RESET;
> for(tr_cntr=0;tr_cntr<26;tr_cntr++)
> {
> while(IO_SSR1.bit.TDRE == RESET);
> IO_SSR1.bit.TDRE = RESET;
> IO_SIDR1.byte = (0x41+tr_cntr);
> }
>
> IO_SSR1.bit.RIE = SET;
> }
> }
> }
> if i hit a single key 26 char should be dispalyed on the hyper
> terminal. it is working if i use polling but not in interrupt. should i
> supposed to enable or disable any other registers. plz suggest me.
>
> Regards
> Charan
Have you updated the vector table (vector.c)? Have you set the priority
register (ICR)?
Reply by Charan●February 26, 20062006-02-26
hi all!
here i am doing a project project using Fujitsu
Controller(MB90F428).first i have wriiten the test coding for UART
communication. if i use polling my coding is working but interrupt is
not working. here is my code
#pragma intvect Int_Uart1Rx 37 // UART1 RX
void Main()
{
IO_ICR13.byte = 0x00;
IO_DDR0.bit.D03 = 0;//Input port
IO_DDR0.bit.D04 = 1;//output port
IO_SMR1.byte = 0x11;
IO_SCR1.byte = 0X13;//Tx,Rx enabled
IO_SSR1.byte = 0x0A;
IO_CDCR1.byte= 0x80;
IO_SSR1.bit.RDRF = RESET;
while(1);
}
/****************************Interrupt Routine*************/
__interrupt void Int_Uart1Rx(void)
{
if(IO_SSR1.bit.RIE == ON)
{
if(IO_SSR1.bit.RDRF == ON) // if "UART1 has received" interrupt
{
IO_SSR1.bit.RIE = OFF; // interrupt disabled
Rx_VALUE = IO_SIDR1.byte;
if(IO_SSR1.bit.RDRF == RESET)
IO_PDR7.bit.P75 = LED_ON;
IO_SSR1.bit.TDRE = SET;
IO_SCR1.bit.REC = RESET;
for(tr_cntr=0;tr_cntr<26;tr_cntr++)
{
while(IO_SSR1.bit.TDRE == RESET);
IO_SSR1.bit.TDRE = RESET;
IO_SIDR1.byte = (0x41+tr_cntr);
}
IO_SSR1.bit.RIE = SET;
}
}
}
if i hit a single key 26 char should be dispalyed on the hyper
terminal. it is working if i use polling but not in interrupt. should i
supposed to enable or disable any other registers. plz suggest me.
Regards
Charan