Dammit, what am I not doing?


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216

    Default Dammit, what am I not doing?

    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.
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink just forgotten some details ...

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    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?)
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  4. #4
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    I am a neofyte myself, but TRISIO has only 6 digits.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by muddy0409 View Post
    ...but what you say is all Greek to me....
    Hey, whats wrong with Greeks??? ;-)

    Ioannis

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    from what i heard, appart that friday 13 mean nothing but tuesday 13... nothing... life is good
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    There's nuthin wrong with Greeks......They just talk funny!
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  10. #10
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    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.
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by muddy0409 View Post
    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
    Last edited by Acetronics2; - 15th April 2007 at 13:38.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  12. #12
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    . . . but some have shorter memory retention ( LOL ) than others !!!

    Alain
    Hey, I resemble that remark!
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  13. #13
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    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

  14. #14
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    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...........
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts