CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Pin select

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Bill24



Joined: 30 Jun 2012
Posts: 45

View user's profile Send private message

Pin select
PostPosted: Sat Aug 18, 2012 8:18 am     Reply with quote

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: 1354

View user's profile Send private message

PostPosted: Sat Aug 18, 2012 9:01 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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