A single maxim chip can act as a good interface
between the uC and Serial Port. You could also do
this with Logic chips but correct levels and
isolation cannot be achieved, Hence better to use
use these interface chips.
The example code for display drive, comm port has
been given in the other projects on this site. So
I will just explain how you can get the data from
Set Port 0 and Port 1 all pins high by writing
ones. enable INT1
On INT1 interrupt Check the state of P 0.4 or D5
digit 5 of 7135.
if P 0.4 is low then do not do anything.
if P 0.4 is high then read Port 0 and store them
in say D5VAL "value of D5".
Also in a place say DIGCNT "digit counter" store
the number 5.
now interrupt occurs again .....
decrement DIGCNT to 4
AND Port 0 value store in D4VAL.
.......... this goes on till DIGCNT comes to 1
then you got all the data.
Lower nibble of Port 0 contains the BCD value of
Digit 5 is MSD and Digit 1 is LSD.
Upper nibble contains polarity, over range and
P1.2 can be used as an output port to RUN-HOLD the
7135 if you want.
Keep it low to hold and a high pulse to get one
reading or keep it high to keep reading.