Hi again,
I tried ex_sisr.c example unfortunately I can not handle the int_rda interrupt.
Please check my simple code (with no int_rda) which works well below ;
--------------------------------------------
#include <16F628A.H>
#fuses INTRC_IO, NOWDT, NOPROTECT, PUT,NOMCLR,NOBROWNOUT
#use delay(clock = 4000000)
#include "flex_lcd420.c"
#use rs232 (baud=2400, rcv=pin_b1, INVERT)
char data[20];
void main() {
lcd_init();
while (TRUE) {
gets(data);
printf(lcd_putc,data);
}
}
----------------------------------
and here is the code pieces which I added to ex_sisr ;
...
#int_rda
void serial_isr() {
int t;
//added to blink on interruption
output_low(pin_b0);
delay_ms(1000);
output_high(pin_b0);
...
void main() {
//added to blink on startup
output_low(pin_b0);
delay_ms(1000);
output_high(pin_b0);
enable_interrupts(int_rda);
// #if defined(__PCD__)
// enable_interrupts(intr_global);
// #else
enable_interrupts(global);
// #endif
...
-----------------------------------
In the second example I see led blinking in main(), but no blinking in serial_isr() during serial data send.
Please help why this hardware usart doesn't work but software working ?
kB