is it possible to disable the Uart FIFO on p24 ?
Thank you zoran,zristic wrote:Nothing special there:
Code: Select all
function Uart1_Read_Char : word; begin result := U1RXREG; end;
This is very weird then. Jpc, what happens when you declare ik1 as a word? I'll also quickly try it.
Anton
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
we seem to have identical thoughts , already tryed to make ik1 a word , no difference. When i start typing on my connected terminal 1234etc only on the 4 i get out of the fifo the first 1, if i continue typing the received hcaracters appear all ( except of coarse the last 3 )
Au royaume des aveugles, les borgnes sont rois.
still unresolved but i can add to this the fact that there seems to be a similar issue on P30 , the uart_isr occasionally gets out of synch with the send characters. After replacing the direct acces to UxRXREG by a call of Uartx_Read_Char the issue seems to have disappeared.
Au royaume des aveugles, les borgnes sont rois.
Hi,
I have no idea why this happens, but as jpc also noted. The following code doesn't work on a PIC24. Only every 3rd character will interrupt.
Changing the code to call an external function, makes the code fully functional.
I'll post the asm listing of both the examples in a while.
Anton
I have no idea why this happens, but as jpc also noted. The following code doesn't work on a PIC24. Only every 3rd character will interrupt.
Code: Select all
var k : word;
procedure IRQ_Uart1_Int; org $2A;
begin
k := U1RXREG;
end;
Code: Select all
function IRQ_Uart1_Read_Char : word;
begin
result := U1RXREG;
end;
procedure IRQ_Uart1_Int; org $2A;
begin
k := IRQ_Uart1_Read_Char;
end;
Anton
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
Anton, are you sure only the 3rd character interrupt's ? I have been in contact with Microchip on this issue, finally started debugging by simply using Uast_Write_Text() inside the ISR ( this works very well on the 16 bit PICS's ) and found that i get interrupt but somehow get 3 empty characters in my buffer. The mystery remeined unresolved, the workaround is very simple but Microchip seemed anxious about this issue. I can reopen that ticket if we find something more solid, after all we work in another compiler than their engineers.
Au royaume des aveugles, les borgnes sont rois.