As this node will be fairly busy, I have decided to implement this with interrupts. The interrupts come from one of three (3) devices: CANaerospace Bus interface, USB term, one (1) of 2 switches, each with two(2) posisstions.
CANaerospace Bus:
Hardware - Software Design: | ||
| This node can respond to messages for ID#:
| |
Switches: To handle the 4 choices set P -Down and TEST - FILL. I will use a 7 to BCD priority encoder coupled to a Schmitt Trigger. I will use the following functions:
- void upTank up()
- void downTank down()
- void test() ::= Turns on all bits in both displays, waits about 30sec and then print(display) display1: BITE TEST, display2 OK vxx
- fill( int curTank)::= Diplay1 curTank; Diplay2 Filled when fuel in curTank == #maxTank 75.0; etc.
Code Fragment:
| |
void loop(){ | |
| void canbus() { |
Reference: CANaerospace Interface Specification; The default Node Identification Service (IDS) distribution are described in chapter V pages: 24/45
"Each CANaerpace unit must support at least the Identificacion Service (IDS) on Node Service Channel 0. This makes sure that a CANaerospace network can be scanned for attached units to determine their status, header type and identifier assignment. Note that within a CANaerospace network, other header types than the standard CANaerospace header and several identifier assignment schemes (including entirely user-defined ones) are supported. Whenever possible, it is strongly recommended to use the proposed standard header and identifier assignments, however." -- page: 11 par 2
Top Comments