Addidis/Drawbot-Control — Issue #11: write new configuration to controller 
Author: Addidis
Created: 2011-10-13 20:33:55+00:00
State: open

case 0x13:	//Write new config from DBC
mLED_1_Toggle();
ControlByte = 0b10100110;
pageadd = 0;	//header is on first page
HighAdd = ((pageadd>>8)&0xff);
LowAdd = (pageadd&0xff);
HDSequentialReadI2C(ControlByte, HighAdd, LowAdd, PageString, PageSize ); //High Density Page Read
for (t=0; t<=16; t+=1){	//Loop threw pages
while (!DataRdy1USART());	//wait for byte
PageString[i] = RCREG;	//Stick it in PageString
mLED_1_Toggle();
}
HDPageWriteI2C(ControlByte, HighAdd, LowAdd, PageString );	//High Density Page Write
Delay1KTCYx( 120 );
getvars();	//get new vars
LATCbits.LATC2 = 1;
break;