付録:バースデーデコーダABELソースリスト
module birthday;
flag '-R3';
title 'Birthday 7-segment LED decoder/driver
1996,6,11 by H.Machida';
"Device Declarations
birth device 'P16V8C';
"Pin Declarations
"Input PIN assign
r,s,t pin 1,2,3; " 3bit binary input
nc1,nc2 pin 4,5; " Non connect
nc3,nc4 pin 6,7; " Non connect
nc5,nc6 pin 8,9; " Non connect
"Output PIN assign
a pin 19; " segment a
b pin 18; " segment b
c pin 17; " segment c
d pin 16; " segment d
e pin 15; " segment e
f pin 14; " segment f
g pin 13; " segment g
nc7,nc8 pin 12,11; " Non connect
"Conventional PIN assign
vcc pin 20;
gnd pin 10;
"Constant declarations
H,L,x =1,0,.X.;
"
" Kenji Takakura Birthday decoder truth table
" Input Data Output
" r s t birth a b c d e f g
" 0 0 0 1 0 1 1 0 0 0 0
" 0 0 1 9 1 1 1 0 0 1 1
" 0 1 0 7 1 1 1 0 0 1 0
" 0 1 1 6 1 0 1 1 1 1 1
" 1 0 0 0 1 1 1 1 1 1 0
" 1 0 1 1 0 1 1 0 0 0 0
" 1 1 0 2 1 1 0 1 1 0 1
" 1 1 1 2 1 1 0 1 1 0 1
"
equations
"segment a
a= !r&!s& t # !r& s&!t # !r& s& t
# r&!s&!t # r& s&!t # r& s& t;
"segment b
b= !r&!s&!t # !r&!s& t # !r& s&!t
# r&!s&!t # r&!s& t # r& s&!t # r& s& t;
"segment c
c= !r&!s&!t # !r&!s& t # !r& s&!t # !r& s& t
# r&!s&!t # r&!s& t ;
"segment d
d= !r& s& t
# r&!s&!t # r& s&!t # r& s& t;
"segment e
e= !r& s& t
# r&!s&!t # r& s&!t # r& s& t;
"segment f
f= !r&!s& t # !r& s&!t # !r& s& t
# r&!s&!t ;
"segment g
g= !r&!s& t # !r& s& t
# r& s&!t # r& s& t;
"
test_vectors ([r,s,t]->[a,b,c,d,e,f,g]);
[0,0,0] -> [0,1,1,0,0,0,0];
[0,0,1] -> [1,1,1,0,0,1,1];
[0,1,0] -> [1,1,1,0,0,1,0];
[0,1,1] -> [1,0,1,1,1,1,1];
[1,0,0] -> [1,1,1,1,1,1,0];
[1,0,1] -> [0,1,1,0,0,0,0];
[1,1,0] -> [1,1,0,1,1,0,1];
[1,1,1] -> [1,1,0,1,1,0,1];
end birthday;
付録:バースデーデコーダABELコンパイル結果
Device birth
- Reduced Equations:
a = (r & !t # s # !r & t);
b = (r # !t # !s);
c = (!s # !r);
d = (r & !t # s & t);
e = (r & !t # s & t);
f = (r & !s & !t # !r & s # !r & t);
g = (r & s # !r & t);
Chip diagram for Module birthday
Device birth
P16V8C
----------\ /----------
| \ / |
| ----- |
r | 1 20 | vcc
| |
s | 2 19 | a
| |
t | 3 18 | b
| |
nc1 | 4 17 | c
| |
nc2 | 5 16 | d
| |
nc3 | 6 15 | e
| |
nc4 | 7 14 | f
| |
nc5 | 8 13 | g
| |
nc6 | 9 12 | nc7
| |
gnd | 10 11 | nc8
| |
| |
-----------------------------
end of module birthday
ご意見ご感想はこちらまで!!