On 02/04/2008, Dario Greggio wrote: [...] > Probably the "3 Reads" method takes less code and is reliable enough > once the platform is known. It's working now. I have not pin-pointed the error, but after setting bit 1 of TXSTA the code works. But, another question arrived: void send(char letter) { TXREG = letter; while (!TRMT) { // Delay until sent } } works fine, but according to Nicola this is a Bad Idea (albeit I have yet not enough knowledge about the USART-module to tell why) and that I should have written the function like this: void send(char letter) { while (!TRMT) { TXREG = letter; } } Doublechecking the datasheet regarding this bit and register, Nicola are certainly right about it - that you have to wait for the the bit (indicating TSR is empty or not) to be set ("register empty") _prior_ to setting TXREG. But, this does not work for my circuit. That is, doing it the "wrong" way makes it works, and doing it the "correct" way makes it not works. Now I'm entirely out in the blue and have no clue of what's going on. -- - Rikard - http://bos.hack.org/cv/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist