Menu

How to specify output (or input) port?

2021-07-08
2021-07-09
  • Thomas R Consi

    Thomas R Consi - 2021-07-08

    I just got my Relay Computer up and running and am happily learning how to program it. While running the counter program given in the video I noticed that only output 0 is accessed. There is no obvious way from the OUT instruction that I could see to specify which output port to use. How do you specify which output or input port to use in a program?

    Thanks! Tom

    P.S. The printed circuit board was excellent and the computer went together without a hitch. Kudos to Joe on an outstanding design!

     
  • Joe Allen

    Joe Allen - 2021-07-08

    There is only a single port, but it is four bits wide. So, for example, if you write 9 (binary 1001) to the port, bit 0 and bit 3 of it will turn on, and bits 1 and 2 will turn off.

    You can also send characters to the console serial port with the OUTC instruction.

     
  • Thomas R Consi

    Thomas R Consi - 2021-07-09

    Got it. Thanks Joe,

    Tom

     

Log in to post a comment.

MongoDB Logo MongoDB