Shiftout - shiftin question


Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Apr 2010
    Location
    Sweden
    Posts
    10

    Question Shiftout - shiftin question

    Hello.
    I have a compass-module from Hitachi. I have had it connected to a Basic stamp with good result. Now i would like to run it with a PIC. But the program get stucked in the loop below. It assumes to send out (%1100) at shiftout and that is what it should get back at shiftin, but something went wrong here. I use PIC16F690 and I think I tryed to connect and program it to every pin in every thinkable combination.
    Do anyone have some idea who can help me?
    I am a new PIC-user.





    DO ' Status flag checking loop
    HIGH En: LOW En ' Measurement status command

    SHIFTOUT DinDout,clk,MSBFIRST,[Report\4]
    SHIFTIN DinDout,clk,MSBPOST,[Status\4] ' Get Status


    LOOP UNTIL s = Ready ' Exit loop when status is ready
    Last edited by Lasse1; - 3rd April 2010 at 23:12.

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