stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 10

Day 10 of 365 · Beginner · Month 1: First steps

Pins, db and the housing as a display

How devices get onto pins d0–d5, why db is always there and how the housing itself shows a value.

Lesson 9 min Week 2

What you learn today

  • Assign pins with the screwdriver
  • Use db as a device of its own
  • Show Setting on the housing

Six slots and a value of its own: the IC housing is more than a holder for the chip. Before your program can read a sensor, the housing has to know which sensor is meant.

Assigning pins

  • The housing has the pins d0 to d5. Each pin points to a device on the same data network.
  • You assign them with the screwdriver: aim at the pin on the housing and cycle through the devices the network knows.
  • A pin remembers one specific device. If you tear down the sensor and rebuild it, it is a new device for the housing – then you set the pin again.
  • A free pin is no problem as long as the program does not use it.
l r0 d0 Pressure    # sensor on d0
l r1 d1 Pressure    # second sensor on d1
Warning

If the chip reads from a pin without a device, it reports DeviceNotFound and stays on that line. As soon as the device is assigned again, it carries on.

db: the housing itself

db needs no screwdriver, it is always there. The housing has LogicTypes of its own:

LogicTyperead/writeMeaning
Settingbotha free-to-use value, the housing displays it
Errorread1 if the chip currently has an error
Onbothhousing switched on
Powerreadhousing has power

Setting as a display

The value in db Setting appears on the housing's small screen. For a quick look you do not need a display of your own:

l r0 d0 Temperature
sub r0 r0 273.15
s db Setting r0     # housing shows degrees C

With l r1 db Setting you read the value back. Other chips and devices on the network can read it as well – that becomes important later when chips talk to each other.

Tip

The housing is your test bench. If you do not trust a value, write it to db Setting and look at what the chip really sees.

Note

In a later lesson you learn alias. An alias on a pin, such as alias Sensor d0, then also shows at the housing's screw.

Diagram

IC housing with chip, pins and data network IC housing IC10 db d0 d1 d2 d3 empty d4 empty d5 empty Gas sensor Wall light Display data cable Pump Battery Heater … data network: lb, lbn, sb, sbn
On the housing six pins point to devices on the data network. db is the housing itself – it has its own Setting.

Exercise

Task

An inside gas sensor is attached to d0, an outside one to d1. The housing should show how many kPa the inside pressure is above the outside pressure:

db Setting = inside pressure − outside pressure

Hints

Hint 1

Two l with Pressure, one per pin.

Hint 2

The difference with sub, the result onto the housing with s db Setting ….

Quiz

4 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the simulator exercise
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere