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

pic18f67j94 any help

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



Joined: 10 May 2011
Posts: 6

View user's profile Send private message

pic18f67j94 any help
PostPosted: Tue Aug 13, 2013 10:53 am     Reply with quote

dear forum members,

did anybody used pic18f67j94 with ccs compiler, if so is it worthful, since i need 4 usart in my application and this controller is suitable, so need help in configuring 4 usarts interrupt based.

not understanding the ppi suite.

pl help.
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Wed Aug 14, 2013 1:50 am     Reply with quote

First, compiler version. Can matter and should always be posted.

The interrupts are just the same no matter how many UARTs you have.
So:
Code:

#INT_RDA3
void uart3_rxd(void)
{
   //code to receive a character from UART3
}

What is 'ppi suite'?.

Like most later chips, this supports relocatable peripherals. So you _must_ select the pins to be used, before setting up the UART.
Syntax should be:
Code:

   #pin_select TX2=PIN_B2
   #pin_select RX2=PIN_B3
#use rs232(baud=57600,parity=N,UART2,bits=8,stream=PORT2,BRGH1OK,errors)

Note two things. Pins are selected _first_, then the UART setup, uses the logical UART name, not the pins. This ensures you are talking to the UART, not directly to the pins.....

Problem is that if you just use the pin names, the compier does not 'know' you want to use the UART, so generates a software UART, with no interrupts....

Best Wishes
12Lapointep



Joined: 04 Aug 2015
Posts: 16
Location: United States

View user's profile Send private message

PostPosted: Tue Aug 04, 2015 3:40 pm     Reply with quote

I am currently using the PIC18F67J94 for an application. I need 3 UARTs for my microcontroller and PIC18F67J94 has four of them but they are remappable. I tried using the #pin_select but I get some errors back saying that Invalid Pre-Processor Directive Invalid Pin: RP0 cannot be assigned to U1TX.

I was wondering if my compiler was working fine since there seems to be no mistake from what I have been reading. Did you figure out what the problem was for yours?
Markdem



Joined: 24 Jun 2005
Posts: 206

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 04, 2015 10:48 pm     Reply with quote

Quote:
I tried using the #pin_select but I get some errors back saying that Invalid Pre-Processor Directive Invalid Pin: RP0 cannot be assigned to U1TX.


Are you sure PIN_RP0 is valid? Looking at my 18F67J94.h file it looks like it is not.
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