Pic 16f628a comparator problem,help me...

Status
Not open for further replies.

sarathsnairpoonjar

Member level 2
Joined
Nov 12, 2012
Messages
50
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Cochin,Kerala,India
Activity points
1,560
I Want to use the comparator module of 16f628a,i have set up the TRIS and CMCON registers according to the datasheet
ii set up like this
TRISA=0X05;
CMCON=0X03;
but no output in RA3
help me.....
 

it was some software problem....now i got stuck with capture device ...the capture interrupt is not working
TRISA=0X00;

TRISB3_bit=1;
TRISB4_bit=0;
CCP1CON=0x05;
INTCON = 0b11000000;
T1CON=0x01;
PIR1.CCP1IF=0;
PIE1.CCP1IE=1;
PORTA=0XFF;



is there any problem with the given settings???
if so please help me...
 

To solve such problems post a complete code, what compiler are you using? What are you actually trying to do? R u trying to measure the High time or timeperiod of a pulse? I have a complete working library of codes for each and every periphiral of PIC16,18,24F devices that i am using from quite a while.

- - - Updated - - -

Also you have enabled capture interrupt where are you clearing interrupt flag? Where is the interrupt code?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…