dr_h = addr_h + 1; (i <7) then addr_l = shl (addr_h, 0);; read_usb;
////////////////////////////////////// ;
////////////////////////////////////// _flash: procedurei = 0 to 64; (j) = port0; _time (100);; read_flash;
/////////////////////////////////////
////////////////////////////////////// _flash: procedure = 0; = 00001000b; = addr_l; = addr_h_time (100); = 11000000b; _time (90); = 00000000b_time (100); i = 0 to 64; = 11000000b; = page (j); _time (90 ); = 00000000b; _time (100); = 00001000b; = addr_l; = addr_h_time (100); = 01000000b; i = 0 to 64; (page (j) = port0) then error = 1; _time (100);; write_flash;
/////////////////////////////////////
///////////////////////////////////// _data_usb : procedurewhile (port3 and 00100000b) = 0;
///////////////////j = 0 to 64; i = 0 to 8; while (port3 and 00000001b)> 0; ( port3 and 00000010b) then page (j) = page (j) +1; (j) = shl (page (j), 0); while (port3 and 00000001b)> 0; (port3 and 00000010b) then page (j ) = page (j) + 1; (i <7) then page (j) = shl (page (j), 0);;; read_data_usb;
/////////////////////////////////////
///////////////////////////////////// _data_usb : procedure = 00100000b; (command = 0) then; = 01100000b; (100); = 00100000b (100); j = 0 to 64; i = 0 to 8; = 01100000b; (100); (1 and (sh ( data (j), 1)) = 1) then port3 = 10100000b (100);;;; = 01100000b; (100); = 10100000b (100);; = 0; write_data_usb;
///////////////////////////////////// = 1;/* дозвіл роботи для таймера 0 */= 1;/* дозволяємо індивідуальні маски переривань 7біт */= 1;/* дозвіл обробки переривання від 0 таймера 1 біт */while 1; _command_usb (); (read_flag = 1) then; = addr_l; = addr + h; = 01001000b; _flash (); = 0; = 0; _data_usb ();; (write_flag = 1) then; _data_usb (); = addr_l; = addr + h; = 01000000b; _time (100); _flash (); = 0; = 1;// іспльзуется для подтверденія запісі_data_usb ();;; my_kurs;
Програма для контролера PIC16C765
# include "mchusb. H "charbyte AT (198h), byte AT (199h), (67) byte AT (1B6h), _pr byte AT (1A1h), _p byte AT (1A5h), byte AT (1A5h), byte AT (14h), byte AT (94h), byte AT (06h), char command, i, j, temp; main ()
{(); (ConfiguratedUSB = 0);
{;
} = 00000101b; = 00000011b; (1)
{(); = 000000001b; (size_pr <64)
{(j = 0; j <1; j + +) {(i = 0; i <7; i + +) {= sspcon & 00010000b; (1 and (shr (data [0], 1)) = 1) sspstat = sspstat & 10000000b {= not sspstat; = temp & 10000000b; = not temp
} = not sspcon; = temp & 1000...