Until today i have use the pic16f88 to control a TSA 5511.
My problem now is how to control a BH1415 with pic16f88, because this chip has data - clock and enable.
I have found code , but is for C ,and i don't now.
Code:int setFreq[] = {1,0,1,1,1,1,1,1,1,1,0,1,0,0,1,0}; // set the frequency to 102.1 MHz and other config bits for audio IC // write_to_chip - write enable, clock, and data bits to audio IC void write_to_chip(){ int i,j; PBOUT |= 0x01; for(j = 0; j <= 10; j++) // set a clock delay asm("nop"); for(i = 0; i < 16; i++){ if(setFreq[i] == 1) PBOUT |= 0x04; // set data bit else PBOUT &= 0xFB; for(j = 0; j <= 10; j++) // set clock down delay asm("nop"); PBOUT |= 0x02; // turn clock on for(j = 0; j <= 10; j++) // set up clock delay asm("nop"); PBOUT &= 0xFD; // turn clock off } PBOUT &= 0xFE; }





Bookmarks