Hey
I am a newbie with the MSP430 with no background about programming microcontrollers. I read and tried to study from existing examples but it doesn't work for me, I have lots of difficulties and was hoping for someone to help and guide me. Just to be clear, I know what I need to do but I dont know how to do it...
My project is to build a compass using the MSP430F5529 and the HMC5883L. I connected the P3.0 pin to the SDA of the HMC and P3.1 to the SCL.
The first thing that I want to do is to configure the HMC registers,the problem is that I have only one pin that transferring data and I want to transfer through it a word and not bit by bit, for example :
WDTCTL = WDTPW + WDTHOLD; //disabling watchdog
P3DIR |= BIT0; //P3.0 output direction
P3OUT=0x3C 0x00 0x68; // writing in register A of magnetometer
the 0x3C is the write command to the slave device, the 0x00 is the register number of the slave, and 0x68 is what i want to write in the specific register.
I pretty sure the above is wrong, so if someone can help me with my first step that would be great !
thank you