PDA

View Full Version : Dammit, what am I not doing?



muddy0409
- 14th April 2007, 12:27
Hi all,
Using 12F675 with the following:

TrisIO = %11111001
CMCON=7
option_reg.7 = 0
LOOP:
GPIO.1 = GPIO.4
GPIO.2 = GPIO.5
GOTO LOOP

As you can see, a pretty damn simple program, but it don't work!!!
Well, gpio.5 does follow gpio.2, but gpio.1 does NOT follow gpio.4
I have got config for intosc with pio.4 as i/o
I can't see anywhere in the PRO manual relating to the 12F675 but have RTFM and cannot see where, or what, I am missing out on.
Any Ideas??
Thanks.

Acetronics2
- 14th April 2007, 12:47
Hi,Peter

a '675 has some more built in peripherals ... than a simple comapator !!!

in assembler it is :

movlw 7 ;COMP off
movwf CMCON
clrf ADCON0 ;ADC off "
bsf STATUS,RP0
clrf ANSEL ;All pins are DIGITAL

... assembler is some good brain jogging !!!

and leave that awful drink you make add for ... not good for brain cells !!!

Alain

muddy0409
- 14th April 2007, 14:29
Hmmm..........
Thanks Alain.
You may be french, but what you say is all Greek to me. Don't know first thing about assembler..

Thanks anyway,
Peter.


(whatya mean awful?)

Russ Kincaid
- 14th April 2007, 15:09
I am a neofyte myself, but TRISIO has only 6 digits.

mackrackit
- 14th April 2007, 15:15
Peter,

I do not have the 675 data in front of me, but I think GPIO.1 and GPIO.2 are analog.

Alains code looks that way.

Acetronics2
- 14th April 2007, 15:25
Hi, Muddy

movlw 7 ;COMP off
movwf CMCON

> That means
CMCON = 7

clrf ADCON0 ;ADC off "

> means
ADCON0 = 0

bsf STATUS,RP0
clrf ANSEL ;All pins are DIGITAL

> means
ANSEL = 0

even kangaroos understand that !!!

Alain

Ioannis
- 14th April 2007, 17:29
...but what you say is all Greek to me....

Hey, whats wrong with Greeks??? ;-)

Ioannis

mister_e
- 14th April 2007, 17:35
;) from what i heard, appart that friday 13 mean nothing but tuesday 13... nothing... life is good :D

muddy0409
- 15th April 2007, 06:44
There's nuthin wrong with Greeks......They just talk funny!

muddy0409
- 15th April 2007, 10:06
Hi Alain,
Yeah, that did it!

Gee, it makes me Hopping mad that I gotta ask these questions.
I really shoulda picked up those things from the data sheets.

Thanks man, (again)
and also everyone else that spoke up.

Acetronics2
- 15th April 2007, 10:30
There's nuthin wrong with Greeks......They just talk funny!

wear white robes, are obliged to vote ( the red rope ... ), fight nude, loose golden apples, ...

" timeo danaos et dona ferentes " ... who told that, some centuries ago ???


Don't care about Hopping mad ...

Coz all of us, one day, forgot one of those initialization statements ... but some have shorter memory retention ( LOL ) than others !!!

Alain

Archangel
- 15th April 2007, 23:56
. . . but some have shorter memory retention ( LOL ) than others !!!

Alain

Hey, I resemble that remark!

Ioannis
- 16th April 2007, 06:53
wear white robes, are obliged to vote ( the red rope ... ), fight nude, loose golden apples, ...

" timeo danaos et dona ferentes " ... who told that, some centuries ago ???


Don't care about Hopping mad ...

Alain

Ooh, come on, that was a play by Virgil the Aeneis and was refering to the trojan horse. That was clever move and has nothing to do with the meaning it has today in english lanquage and the wrong translation of Danaos that was a North ancient race. Not Greeks with the narrow meaning!

As for the "robes", they were very cool for the hot days! A/C was not discovered yet... Also fighting nude, you can't cheat!

Cheers!

Ioannis

muddy0409
- 16th April 2007, 08:00
Oh, WOW!!
All this, and culcha too!

Thanks blokes, I guess I will talk to you again soon.

I'm in the middle of a big project, so...........