CLC peripheral on PIC16LF1503

Thread Starter

selfbg

Joined Jun 11, 2010
23
I need some help with the new CLC peripherial. I'm making some kind of router (repeater). The signal on CLC1IN1 is repeated to CLC1. No matter what I do, I can't get it right. I'm using the CLC design tool by Microchip, but still - epic fail. :) I'm looking for example that really WORKS. :rolleyes:

Here is my code:

Rich (BB code):
.......
static char Init_CLC(){
APFCONbits.CLC1SEL = 1; //CLC1 on RC5
CLC1CONbits.LC1EN = 0; //Disable CLC1
ANSELA = 0;
ANSELC = 0; //All pins digital
TRISAbits.TRISA5 = 1; //RA5 - Input - CLC1IN1
TRISCbits.TRISC5 = 0; //RC5 - Output - CLC1
//Configuration bits from CLC designer Tool  
CLC1GLS0 = 0x02;
CLC1GLS1 = 0x00;
CLC1GLS2 = 0x00;
CLC1GLS3 = 0x00;
CLC1SEL0 = 0x01;
CLC1SEL1 = 0x00;
CLC1POL  = 0x02;
CLC1CON  = 0xC0;
}
.........
Thank in advise for the help :)
 
Last edited:

Thread Starter

selfbg

Joined Jun 11, 2010
23
How about feeding gate 1 and gate 2 with that signal and getting rid of the NOT output on gate 2?
I've tried all possible combinations but still no good. The one that I use is from Microchip's designer guide PDF, so I assume that it works. :) Maybe the problem is with input gates. When I change the output polarity the CLC1 pin set.
 
Top