Trying work with Hitachi HM55B Compass Module
Hi. Iam not using·you BASIC Stamp·but·plz·try help me.
Iam trying comunicate with Hitachi HM55B Compass Module by PIC18F4550 with MCC18, but i dont recive the correct status flag.· Iam working with 20Mhz.
·
I translate the code from Basic Stamp2 series test program to MCC18.
The·functions void ShiftOUT (char comando); char TestStatus (void); void ShiftIN (void);·they had been created by me.
In the annexes i send my code and Hitachi HM55B Compass Module documentation.
Plz try help me understand what can be badly.
Iam trying comunicate with Hitachi HM55B Compass Module by PIC18F4550 with MCC18, but i dont recive the correct status flag.· Iam working with 20Mhz.
·
I translate the code from Basic Stamp2 series test program to MCC18.
The·functions void ShiftOUT (char comando); char TestStatus (void); void ShiftIN (void);·they had been created by me.
In the annexes i send my code and Hitachi HM55B Compass Module documentation.
Plz try help me understand what can be badly.
Comments
If you have further questions about the use of non-Parallax processors, you need to post them to the "Sandbox" forum, not this "BASIC Stamp" forum. You may or may not get help ... mostly because your question is really about the use of the PIC18F4550 processor, not the Parallax product and many of the people who serve as resources here have limited experience with these competing processors, myself included.
The values transmitted to and received from the Compass Module
are validate in rising edge or falling edge.
By wave diagram seems that sampling is done on falling edge and not in rising edge like datasheet say.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support