Thank you Skimask,
is exactly what I did last night.
Conclusion:
The chip is FRIED!
There is something wrong with the PortD and PortC.
Actually a new board with another chip it work properly!
My apologises...
I've also apologized with MeLabs... even if I submitted another issue to them.
The new (old) one is related to the fact that the PIR1.5 register seems never find a character in the buffer even if I know that is sure there.
DEFINE HSER_CLROERR 1 and DEFINE HSER2_CLROERR 1 are both at the top of the program.
Things start going bad if I use some I2C command and then inquiry the PIR1.5
What I do not understand is that inquiring PIR3.5 (for the other attached device), it work regularly at any speed (between 2400 and 115200)
the only way to get data from the device attached is to use HSerin with a timeout of 10ms...
If I DON'T USE any I2C commands, both PIR1.5 and PIR3.5 reflect the correct data and behaviour...
I've already posted this strange things in a more detailed post:
http://www.picbasic.co.uk/forum/showthread.php?t=8638
Thank you all guys.
Hope in some hint...
Bookmarks