void main()
{
set_tris_a(11111111); // 1 for Input and 0 for Output, this is easy to remember
set_tris_b(00000000);
set_tris_c(00000000);
while(1) {
output_high(PIN_B1);
output_low(PIN_B2);
}
}
set_tris_a(0xFF); set_tris_b(0x00); set_tris_c(0x00);
while(1) {
output_bit(PIN_B1, 1);
output_bit(PIN_B2, 0);
delay_ms(500);
output_bit(PIN_B1, 0);
output_bit(PIN_B2, 1);
delay_ms(500);
}
org 0x00
start clrf PORTB
banksel TRISB
clrf TRISB
banksel PORTB
movlw 0xAA
movwf TRISB
end
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?