#include<16f872.h>
#fuses HS,NOWDT,NOPROTECT,PUT
#use DELAY(clock=8000000)
#use fast_io(A)
#use fast_io(B)
#use fast_io(C)
void main(){
//Now I'm gunna clear all ports just to make sure that they're not interfering
set_tris_a(0x00);
set_tris_b(0x00);
set_tris_c(0x00);
/*Now gunna initialize the ports in the order I actually need them
/*As a note, I'm going to do this in binary to make sure ONLY the ports
/*I need are going to operational
*/
set_tris_a(0b00000001); //Set PIN_A0 input, all else output
set_tris_b(0x00); //Set ALL port B output
while (1)
{
if (input(PIN_A0))
{
output_low(PIN_B6);
}
else
{
output_high(PIN_B6);
}
}
}