Hi, I tried this example but the isr doent seem to be getting executed.
In the isr i m calling a function to display on 7-segment displays. Otherwise the normal program flow is based on Receiving and Sending data on UART0(using timer1 in 8-bit auto-reload for 9600 baud generation)
"the isr doent seem to be getting executed."
How do you know that? What debugging have you done? Have you tried it in the simulator?
"In the isr i m calling a function to display on 7-segment displays"
There's nothing about 7-segment displays in the application note - so this must be the first thing to check:
Does the interrupt work without your extra code? Does your display code actually work? Is something in your other code disabling the interrupt?
"Otherwise the normal program flow is based on Receiving and Sending data on UART0"
Again, there's none of that in the example.
Go back to the example, and make sure that it works as-is; then add functionality a small step at a time, verifying that it still al works at each step...
There's nothing about 7-segment displays in the application note - so this must be the first thing to check This is an addition from my side And yes the display code works because i have been using the same code only that it wasnt interrupt driven before It was like: while(RI!=1){display();} BUt now i want to call this display funtion in an ISR
I tried a few things since my first post: I commented out PT=0 line from timer 0 initialisation And also commented out serial comm. part. So i was left only with Timer 0 functionality. I filled the display_variables with some values. Then i could see a faint display of these values...
View all questions in Keil forum