I did not put the 'xmit= PIN_A4' and 'rcv=PIN_A5' statements in the code in my post !
You should NOT do it. You should use 'UART1' ONLY ! (After this I give up).
You are quite right, I didn't notice you had left that bit out. I have removed it and it works.
Thanks very much, I'd never have solved it without your help.
Its a pity the compiler documentation isn't a bit better on this
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
Posted: Sun Jun 12, 2011 6:40 pm
The lesson to be taken from this is if the there is a valid interface to the Uart hardware pins and the RDA interrupt code is set up correctly and the RDA doesn't fire then a software UART may have been set up instead. The compiler sets up for a software uart by default if the use rs232 statement syntax hasn't correctly called for hardware to be used. Use of a software uart should be discoverable by looking at the lst file.
harlequin2
Joined: 11 Jun 2011 Posts: 21
Posted: Sun Jun 12, 2011 7:21 pm
Douglas Kennedy wrote:
The lesson to be taken from this is if the there is a valid interface to the Uart hardware pins and the RDA interrupt code is set up correctly and the RDA doesn't fire then a software UART may have been set up instead. The compiler sets up for a software uart by default if the use rs232 statement syntax hasn't correctly called for hardware to be used. Use of a software uart should be discoverable by looking at the lst file.
The compiler is just a bit too helpful! I've never seen one before that would create a s/w uart for you just by a "use rs232" statement.
I've been using Atmel stuff for years and this is the first time I've done anything with a PIC, same for the CCS compiler, so its a relief to get it to do what I want.
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum