|
|
View previous topic :: View next topic |
Author |
Message |
Bill24
Joined: 30 Jun 2012 Posts: 45
|
Pin select |
Posted: Sat Aug 18, 2012 8:18 am |
|
|
Using an 18F46k80 and compiler version 4.135
I am trying to configure the pins for UART 2
#pin_select U2TX = PIN_B6
#pin_select U2RX = PIN_B7
#use rs232(UART2,stream = ccm, baud=19200,parity=N,xmit=PIN_B6,rcv=PIN_B7,bits=8, stop=1)
This results in the copilere error:
--- Info 300 "C:\M777\M7_5\main.h" Line 44(12,22): More info: ** 'one' is not a valid integer value
*** Error 44 "C:\M777\M7_5\main.h" Line 44(12,22): Internal Error - Contact CCS
Can anyone help ? |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1358
|
|
Posted: Sat Aug 18, 2012 9:01 am |
|
|
3 things:
1. I don't see any remappable pins on that chip off hand, so why use #pin_select? Take those out.
2. In your #use rs232() statement you do both UART2 and specify the xmt,rcv pins, which is overkill. If you specify UART2, that is enough. Take out the xmt and rcv options
3. For a hardware uart, you should always add the "errors" option to the #use rs232() statement. It can bite you if you don't |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|