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

PIC 18F27K40 RDA does not work

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



Joined: 27 Mar 2018
Posts: 2

View user's profile Send private message

PIC 18F27K40 RDA does not work
PostPosted: Tue Mar 27, 2018 12:13 pm     Reply with quote

I am doing a project and unfortunately to change the project pic to the PIC18F27K40 the RDA stopped working, I tried to carry out a new project only with the RDA turning on an LED and it still does not work, could anyone help me?

Quote:
Português-BR:
Estou realizando um projeto e infelizmente ao troca o pic do projeto para o PIC18F27K40 o RDA parou de funcionar, tentei realizar um novo projeto somente com a RDA acendendo um LED e mesmo assim não funciona, alguém poderia me ajudar?


Code: main.c
Code:

#include <main.h>

#INT_RDA
void  RDA_isr(void)
{
   output_toggle(PIN_B4);
}     



void main()
{

   enable_interrupts(INT_RDA);
   enable_interrupts(GLOBAL);

   while(TRUE)
   {

   }                                                                                                                                                                                                                         

}                                     


Code:main.h
Code:

#include <18F27K40.h>
#device *ADC=10
             
#FUSES NOWDT                  //No Watch Dog Timer
#FUSES NOEXTOSC               //External Oscillator not enabled
#FUSES NOBROWNOUT             //No brownout reset
#FUSES NOLVP                  //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O

#use delay(internal=64MHz)                                                                   
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=PORT1,enable=PIN_C5)
                                                                         
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Tue Mar 27, 2018 12:29 pm     Reply with quote

You are going to need to use #pin_select. This processor uses pps and there is a sticky at the top of the forum page detailing its use.
makito013



Joined: 27 Mar 2018
Posts: 2

View user's profile Send private message

PostPosted: Tue Mar 27, 2018 12:57 pm     Reply with quote

gaugeguy wrote:
You are going to need to use #pin_select. This processor uses pps and there is a sticky at the top of the forum page detailing its use.


could you give me an example?
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Tue Mar 27, 2018 1:24 pm     Reply with quote

The example is in the post at the top of the forum.....

<http://www.ccsinfo.com/forum/viewtopic.php?t=55097>

For your chip:
Code:


#PIN_SELECT U1RX=PIN_C7
#PIN_SELECT U1TX=PIN_C6
#use rs232(baud=9600,parity=N,UART1,bits=8,stream=PORT1,enable=PIN_C5)
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