Sie sind auf Seite 1von 1

#include <16f877A.

h>
#fuses XT,NOLVP,NOWDT,NOPROTECT
#use delay(clock=8000000)
//#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,ERRORS)
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define

mt1 PIN_B0
mt1b PIN_B1
mt2 PIN_B2
mt2b PIN_B3
mt4 PIN_B4
mt4b PIN_B5
mt3 PIN_B6
mt3b PIN_B7
A PIN_A0
B PIN_A1
C PIN_A2
D PIN_A3
EN PIN_A4

void output_high();
void output_low();

// declare output signal high.


// declare output signal low.

void main()
{
setup_adc(ADC_OFF);
setup_adc_ports(NO_ANALOGS);
while (True){
if (input (A)==1)
output_high(mt1);//else
if (input (B)==1)
output_high(mt2);//else
if (input (c)==1)
output_high(mt3);//else
if (input (D)==1)
output_high(mt4);
delay_ms(10);
}}

// Turn ADC OFF


// All Ports are digital I/O

Das könnte Ihnen auch gefallen