Вт апр 02, 2019 14:21:54
program Kernel_2;
var i,ii: dword;
procedure InitKernel();
Begin
pmpen_bit := 0;
CM1CON := 0x00;
CM2CON := 0x00;
ANCON0 := 0xFF;
ANCON1 := 0xFF;
LATA :=0;
TRISA := %00100000;
PORTA:= %00100000;
LATB :=0;
TRISB := %11110010;
PORTB:= %00001000;
TMR1CS0_bit := 0;
TMR1CS1_bit := 0;
T1OSCEN_bit := 0;
TMR1ON_bit := 0;
TMR3ON_bit := 0;
LATC :=%00000000;
TRISC := %10000000;
PORTC:= %00000000;
LATD :=0;
TRISD := %00011000;
PORTD:=0;
LATE :=0;
TRISE := %00000111;
PORTE:=0;
INTCON := 0xC0;
end;
begin
InitKernel();
while(1) do
begin
SetBit(PORTC,1);
SetBit(PORTC,0);
Delay_ms(500);
ClearBit(PORTC,0);
ClearBit(PORTC,1);
Delay_ms(500);
end;
end.