SHIFTOUT with PIC12F675?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,166


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Maybe it is better to define the output register more convenitional.

    Try

    TRISIO = 0

    DIO VAR GPIO.1
    CLK VAR GPIO.2

    and report back how is doing.

    Ioannis

  2. #2
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Hi,

    I'm trying to understand and learn:

    What might be the consequences if I set my ports as follows:

    Dio var GPIO.0
    or
    Symbol Dio = GPIO.0

    Does this make a difference to the way the program is processed?

    Thanks

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,166


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Originally the problem I think was this syntax:

    '*** In/Out pins ..................................................
    Output 1 : _DIO var GPIO.1
    Output 2 : _CLK var GPIO.2

    I do not see how this can compile.

    Ioannis

  4. #4
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Hello,
    And yet the compiler didn't give any errors!?

    I'm going to keep your suggested syntax anyway.

    Concerning my problem with the Shiftout command, I note that a problem existed with this command for the Picaxe 08M2 (which is in fact a PIC12F1840).
    The Shiftout command was not possible for this Picaxe and it was necessary to create a small routine explained in the Picaxe manual.

    Before continuing my tests, I wondered if such a problem could also be encountered with my Pic12F675... ?

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,166


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    In PBP I never encountered any problems with SHIFTout or SHIFTin commands.

    I pressume you will not have too.

    Ioannis
    Last edited by Ioannis; - 25th July 2023 at 13:16.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,166


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Quote Originally Posted by zorgloub View Post
    Hello,
    And yet the compiler didn't give any errors!?
    Why would give any error?

    output 1 or output 2 are valid commands that make pin 1 or pin2 output.

    And then you define the aliases _DIO var GPIO.1 etc.

    But did not defined the TRIS register.

    Ioannis

  7. #7
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Quote Originally Posted by Ioannis View Post
    Why would give any error?

    But did not defined the TRIS register.

    Ioannis
    Isn't using the input or output commands for the ports used is not enough or does it work?

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,166


    Did you find this post helpful? Yes | No

    Default Re: SHIFTOUT with PIC12F675?

    Yes but you defined wrong. For example _DIO var GPIO.1 is not the same as DIO var GPIO.1

    Ioannis

Similar Threads

  1. Pic12f675
    By Andre_Pretorius in forum Serial
    Replies: 1
    Last Post: - 6th April 2009, 00:27
  2. PIC12F675 not working
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th March 2009, 17:40
  3. SERIN with a PIC12F675
    By ewandeur in forum Serial
    Replies: 4
    Last Post: - 30th July 2007, 15:04
  4. Pic12f675
    By perides in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th July 2007, 20:37
  5. PIC12F675 and ADCIn
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th February 2005, 07:42

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