
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Lab 02 The code depicting reading input from RB0 and outputting the bits value (it) to RB1. Designed by: Omer Farook Jan 15th 2009 */ #include <16f88.h> //Header file for chip being used
//main body of program void main (void) {
/******************************************************************
//creates endless loop could also have been done with while (1) start: if (!input(pin_B0)) { //if RB0 is 0, then only if icondition is true //and then and then only make RB1 0 output_bit(pin_B1,0); }
if (input(pin_B0)) { //if RB0 is 1, then only if icondition is true //and then and then only make RB1 1 output_bit(pin_B1,1); }
goto start; //repeat loop at start }