Курсовая работа: Устройство управления системой измерения веса
#define Dig0 SegA + SegB + SegC + SegD + SegE + SegF + 0
#define Dig1 0 + SegB + SegC + 0 + 0 + 0 + 0
#define Dig2 SegA + SegB + 0 + SegD + SegE + 0 + SegG
#define Dig3 SegA + SegB + SegC + SegD + 0 + 0 + SegG
#define Dig4 0 + SegB + SegC + 0 + 0 + SegF + SegG
#define Dig5 SegA + 0 + SegC + SegD + 0 + SegF + SegG
#define Dig6 SegA + 0 + SegC + SegD + SegE + SegF + SegG
#define Dig7 SegA + SegB + SegC + 0 + 0 + 0 + 0
#define Dig8 SegA + SegB + SegC + SegD + SegE + SegF + SegG
#define Dig9 SegA + SegB + SegC + SegD + 0 + SegF + SegG
#define DigMinus SegA + SegB + SegC + SegD + 0 + SegF + SegG
#define PositionPort PORTD
#define Position0 0
#define Position1 1
#define Position2 2
#define Position3 3
#define AllDigitsOFF 4
#define DigitNmb = [254, 253, 251, 247]
//== Global Variables =========================
unsigned char BufSeg[4];
unsigned char BufBCD[4];
void Bin2BCD_4Digit (unsigned int data);
//== Convert binary char into 7 Segment Code =============
unsigned char Bin2Seg (unsigned char data)
{
switch(data)
{
case 0: return Dig0;
case 1: return Dig1;