Mortenc
Joined: 22 Feb 2007 Posts: 55
|
Odd setup_ccp1 |
Posted: Thu Jun 04, 2009 1:53 am |
|
|
Hello friends
I will just inform something odd I have observed in setup the CCP1 module.
I have wasted hours of solving a problem why my capture sometimes failed.
I'am an old ASM-programmer and I always have re-initialized my active modules in every program turnaround.
I this case I have re-initialized my CCP1 module and the list file shows:
Code: | .................... setup_ccp1(CCP_CAPTURE_RE);//Capture on rising edge
06F6: CLRF FBD
06F8: MOVLW 05
06FA: MOVWF FBD
06FC: CLRF FB7 |
As you can see the the CCP1CON is first cleared before it's setup again.
This leaving a small time where the capture is not working, which where giving me a problem.
I'am wondering why CCS have done so in their translation.
I hope that I can save other programmers of wasting time of this problem with this information. |
|