The procedure for writing the CC1000 internal register of the P87LPC762 MCU is as follows:
C program
Write_com(uchar addr,uchar com_data) //Write internal registration
Subroutine
{ char i;
Addr<<=1;
Pale=0; //Allow address latching
For(i=0;i<7;i++) { //Send address
Addr<<=1;
P_data=CY;
Pclk=0; //rising edge
Pclk=1;
}
P_data=1; //write operation
Pclk=0;
Pclk=1;
Pale=1; //Disable address latching
For(i=0;i<8;i++){
Com_data<<=1;
P_data=CY;
Pclk=0;
Pclk=1;
}
}
Hall Split Core Current Sensor
Shaanxi Magason-tech Electronics Co.,Ltd , https://www.magason-tech.com