//Verici Devre Yazılımı
#include <16f877A.h>
#fuses XT, NOWDT, NOPROTECT, NOBROWNOUT, NOLVP, NOPUT, NOWRT, NODEBUG, NOCPD
#use delay (clock=4000000)
int1 BIT0, BIT1, BIT2, BIT3;
int1 BIT4, BIT5, BIT6, BIT7;
int8 Sending = 0x00;
int8 Temp = 0x00;
void main(void)
{
set_tris_a(0x00);
set_tris_b(0xFF);
set_tris_e(0x01);
while(1)
{
while(!input(PIN_E0));
Sending = input_b();
BIT0 = bit_test(Sending, 0);
BIT1 = bit_test(Sending, 1);
BIT2 = bit_test(Sending, 2);
BIT3 = bit_test(Sending, 3);
BIT4 = bit_test(Sending, 4);
BIT5 = bit_test(Sending, 5);
BIT6 = bit_test(Sending, 6);
BIT7 = bit_test(Sending, 7);
output_bit(PIN_A0, 1); // Start biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT0); // Verinin 0. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT1); // Verinin 1. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT2); // Verinin 2. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT3); // Verinin 3. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT4); // Verinin 4. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT5); // Verinin 5. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT6); // Verinin 6. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, BIT7); // Verinin 7. biti gönderildi
delay_ms(10);
output_bit(PIN_A0, 0); // Stop biti gönderildi
}
}