Hi Since I want to set three input and one output so my code would be like that: //Configurations sbit READ_1=P1^0; sbit READ_2=P1^1; sbit READ_3=P1^2; sbit SEND=P1^3; READ_1=1; //INPUT READ_2=1; //INPUT READ_3=1; //INPUT SEND=0; //OUTPUT //Main program bit x1,x2,x3; x1=READ_1; x2=READ_2; x3=READ_3; SEND=x1; Is it correct? Arron
I always use an infernal loop in all my daemon code OOPS that should have been "eternal" Erik
#include <Reg52.H> sbit output = P1^0; sbit input = P1^1; /* ......................................................... void main (void) { bit x; // Set switch pin for reading input = 1; while(1) { x = input; // Read Pin 1.0 output = x; // Write to Pin 1.1 } }
#include <Reg52.H> sbit show = P1^0; sbit sense = P1^1; /* ......................................................... void main (void) { bit x; sense = 1; while(1) { x = sense; // is Pin 1.0 pulled low ? show = x; // (re)set Pin 1.1 accordingly } }
How can I use port 3^1 as input and output, for example working with 3-wires serial eeprom (AT93C46 - DIN and DOUT)?
How can I use port 3^1 as input and output, for example working with 3-wires serial eeprom (my uC (3^0) connecting toAT93C46 - DIN and DOUT)?
How can I use port 3^1 as input and output I give up there is no "input" and "output" on the '51, READ "THE BIBLE" DIN and DOUT are separate on the EEPROM and can not be connected. Erik