Dammit, what am I not doing?


Closed Thread
Results 1 to 14 of 14

Hybrid View

  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.

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