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
Bookmarks