2. According to the given datasheet, in the Electrical Characteristics
table on page 2, Digital I/O section, you're operating in the undefined
logic state for this device, or any 5V/ТТL logic device for that matter.
Any particular reason why?
A low state, a '0', for the control lines of this device is any voltage
between 0 to 0.8V, and a high state, a '1', is defined as any voltage
higher than 2.4V to Vcc. Anything in between
i.e. 0.8V‹ V‹ 2.4V, will be in an undeterminable state.
For reasons why this occurs, read up on totem-pole configurations, and
TTL and CMOS logic gate topologies in any introductory college/uni text
on digital logic, e.g. Tocci or Wakerley. (I presume you know how a
transistor works in switching mode?) This will also explain your first
A reference I thoroughly recommend to anyone learning or experimenting
with analogue or digital electronics, or even professionally, is "The
Art of Electronics", 2ed, by Paul Horowitz and Winfield Hill, 1989,
Cambridge Uni Press, aka "The Silver Bible". It's even available in its
entirety of 1125pp. on the web. Worth every cent if you decide to buy
it, although some of the later chapters on microprocessors are a bit
dated, but useful all the same for understanding modern