sponiche
Newbie level 1
Hello,
I need help.
PIC USED 18F46J50
Compiler MikroC PRO
Set RX2 and TX2 in the RP0 RP1.
Puertos TX1 and RX1 occupied.
code used
Problem - Error when starting the UART2, will the mapping is done well?
Lack set any records?
other code that has been tried:
the problem is the same.
someone can help me with this problem?
thank
I need help.
PIC USED 18F46J50
Compiler MikroC PRO
Set RX2 and TX2 in the RP0 RP1.
Puertos TX1 and RX1 occupied.
code used
Code:
{
RCSTA2.SPEN=1; // activate USART2
TRISA.F0=1; //RX2 Input
TRISA.F1=0; //TX2 Output
INTCON.GIE=0; // disable interrupts EECON2=0X55; //
EECON2=0XAA;
PPSCON.IOLOCK=0;// Allows you to change pin
RPINR16=0X00; //RX2 em RP0
RPOR1=0X05; //TX2 em RP1
EECON2=0X55;
EECON2=0XAA;
PPSCON.IOLOCK=1;// closes mapping
INTCON.GIE=1; // enable interrupts
.
.
.
.
.
UART2_Init(9600);
}
Problem - Error when starting the UART2, will the mapping is done well?
Lack set any records?
other code that has been tried:
Code:
{ Unlock_IOLOCK();
PPS_Mapping_NoLock(0, _INPUT, _RX2_DT2); // RX - RP0.
PPS_Mapping_NoLock(1, _OUTPUT, _TX2_CK2); // TX - RP1.
Lock_IOLOCK();
}
someone can help me with this problem?
thank
Last edited by a moderator: