Editing
7 Segment Display
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Using the OUTPUT command == An alternative method of controlling the display is by using the OUTPUT command. This allows you to set all the digital outputs on or off with one command. Each individual output has a value as shown in the following table: {|class="wikitable" |- |Output 0 || 1 |- |Output 1 || 2 |- |Output 2 || 4 |- |Output 3 || 8 |- |Output 4 || 16 |- |Output 5 || 32 |- |Output 6 || 64 |- |Output 7 || 128 |} Individual outputs can be switched on by adding up the values in the table and sending this value to Smart Box with the OUTPUT command. The number zero requires outputs 0,1,2,3,4 and 5 to be switched on so by adding up the corresponding values in the table we get the value 63. Try OUTPUT 63 to check that 0 is displayed. Now try OUTPUT 3. The number one will be displayed. Note that the OUTPUT command has also switched off the other digital outputs. In this way the OUTPUT command can be used to reduce the number of program lines that you require. It is of course much more difficult to determine from the program which outputs are going to be switched on when you read an OUTPUT command so this instruction tends to be used by experienced users. [[Category:Outputs]]
Summary:
Please note that all contributions to Smart Box may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Smart Box:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information