PDA

View Full Version : Still 12F675 question



F1CHF
- 29th July 2009, 11:09
Hello
I am still "playing" with a 12F675
this is quite new for me
I use
ansel = 0 ' all digital
cmcon = 7 ' comparator OFF
TRISIO = %001001 ' GP0 et GP3 en INPUT
OPTION_REG.7 = %110110 'pull up actifs

My problem is : I have no signal on output port !
question : may I have to use pull up resistors on output port
or this option_reg.7 will switch internally thoses pull up ?
(weak pull up story) on page 21 of the datasheet

thanks in advance
francois

mackrackit
- 29th July 2009, 12:28
I would not mess with the weak pullups , just pretend they are not there for now.
Can you post all of your code and configs? Makes it a bit easier to see what you have.

F1CHF
- 6th August 2009, 18:42
Dave
Sorry for the delay, I was in vacation
to be clear, I do not understand your answer , I'm french , so, english expressions
are not so easy to understand ..
I must work on my application and come back with more details
to see if I need to connect pull up resistors (as in the past)
or to "play" with option reg command !
I will come back soon
Francois

Archangel
- 6th August 2009, 21:13
Hello Francois,
To have "all digital" you have the ADCON0 register to deal with, specifically the ADON bit which is ADCON0.0 which must be cleared either by ADCON0 = 0 or ADCON0.0 = 0

mehmetOzdemir
- 7th August 2009, 09:11
OPTION_REG.7 = %110110 'pull up actifs



option_reg.7 is just a bit.

you should do this to activate pull-ups.



OPTION_REG.7 = 0 ; activate pull-ups



and you dont need to use pull-ups for output.

F1CHF
- 7th August 2009, 16:34
Hello
I was STUPID with my option-reg.7 bit !
May be I was swimming in all those bits in all those registers !
I have made some changes, BUT the DUCK is still alive
I have NO signal (digital) on ENAB, DTA and Clk
LED is flashing (at least !)

any ideas ?
thanks

hardware in PDF
CODE in txt

Archangel
- 7th August 2009, 17:35
Hello
I was STUPID with my option-reg.7 bit !
May be I was swimming in all those bits in all those registers !
I have made some changes, BUT the DUCK is still alive
I have NO signal (digital) on ENAB, DTA and Clk
LED is flashing (at least !)

any ideas ?
thanks

hardware in PDF
CODE in txtHi Francois,
You built yourself a nice loop there, complete with flashing leds:D
it goes 2 places, th BOUCLE or INIT, you did not tell it to go anywhere else, if you want it to procede to envoi take out goto init.

F1CHF
- 7th August 2009, 21:09
Thank for your help but you surprise me ..
power on
INIT ...
goto envoi
send data(s) to PLL
goto boucle
if LOCK = 1 goto boucle (LOCK is OK PLL is running)
if not goto INIT

as far as I understand

I will put some pullup to check now ..
it is very strange

Francois