0
\$\begingroup\$

I have a homework. I must design a circuit that makes addition with signed and unsigned numbers. I will use registers. I need two output ports. It says "8-bit output ports (2 ports: one for unsigned output and one for signed output) (Ports can be ' registered‘.) " I don't understand what he means by saying "ports can be registered". I am using max plus 2 for circuit design.

\$\endgroup\$
  • \$\begingroup\$ No idea either, and I've been using MCUs for 40 years \$\endgroup\$ – Dirk Bruere Oct 29 '18 at 10:14
  • \$\begingroup\$ Please quote the full question and what the name of the course / subject is and what "module" of the course this is from. \$\endgroup\$ – Transistor Oct 29 '18 at 10:21
2
\$\begingroup\$

A registered output port is one where the data lines are driven according to the contents of a register that can be written and read just like a memory location.

The simplest form of output port is just a latch that can only be written to. In an embedded system, the individual port lines are often used for different functions and may well be controlled by different parts of the code that know nothing about each other, so it's important that you can change the state of individual lines without disturbing the others.

If you have a write-only output port you would need to use a memory location to remember the state of all the output pins so you can read the memory, change the bit(s) you want and then write the new value to the port and back to the memory location for next time.

A registered port lets you read the current outputs directly from the port, change the bit(s) you want and write them back again. Many processors have bit set and reset instructions to do this quickly and efficiently.

\$\endgroup\$
  • \$\begingroup\$ So how do I register a port in max plus 2 \$\endgroup\$ – Gamer89 Oct 29 '18 at 11:21
  • \$\begingroup\$ No idea. But you don't "register a port", you use a "registered port". \$\endgroup\$ – Finbarr Oct 29 '18 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.