This is my related piece of code:
pinMode(CLK , OUTPUT);
pinMode(DOUT , OUTPUT);
//
void Write_Bit_0(void){
digitalWrite( DOUT , LOW );
digitalWrite( CLK , HIGH );
digitalWrite( CLK , LOW );
}
void Write_Bit_1(void){
digitalWrite( DOUT , HIGH);
digitalWrite( CLK , HIGH );
digitalWrite( CLK , LOW );
}
//
....
My problem is to increase CLK frequency. it seems that digitalWrite command take about 800 ESP clock to run!(I measured it with ESP.getCycleCount()).
Can anyone suggest a solution to increase CLK frequency up to 8 Mhz?
Thanks