Are you checking voltage on pin A.2?
I see nothing, as long as you're checking B.7.
What happens if you move DACCON0 after the other registers, just before DEFINE OSC?
Maybe you are disabling DAC accidentally.
Robert
Are you checking voltage on pin A.2?
I see nothing, as long as you're checking B.7.
What happens if you move DACCON0 after the other registers, just before DEFINE OSC?
Maybe you are disabling DAC accidentally.
Robert
Last edited by Demon; - 4th December 2014 at 23:06.
Robert: กกก PROBLEM SOLVED กกก
The power supply is 5 V. I am checking Portb.7 because I config the DACCON0 as $90.
This enable the DAC and select Portb.7 as output.
I move the DACCON0 register as you suggest,but the result is the same.
Also I do not why,PORTA.6 remains lit when is making the voltage loop.
It is configured as output and I clear the port at the begginning.
I am using the EASYPIC V7 for development,and I realize I was loading
The portb with the panel Leds. I turnoff the led selection and now all is working OK.
Thanks for your comments...
Ruben de la Pena
Have you tried this?
Code:LED var LATa.7
Why do this?
RobertCode:FOR AUX = 0 TO 4 LED = 1 PORTA = 255 PORTC = 255 PAUSE 500 LED = 0 PORTA = 0 PORTC = 0 PAUSE 500 NEXT AUX
Robert:
It works... the problem with Porta.6 was configuration. It was as oscilator output.
Changing & _CLKOUTEN_ON TO & _CLKOUTEN_OFF , in _CONFIG2 ,turn off the porta,6 and then
can be used as normal i/o port.
Thanks again...
Ruben de la Pena
Edited: I was testing the ports as IO.
Greetings...
Ruben de la Pena
Last edited by Ruben Pena; - 5th December 2014 at 01:01. Reason: I forgot to anwer to your cuestion..
Bookmarks