Connecions
// Define segment pins sbit SEG_A = P1^3; // Segment A (P1.3) sbit SEG_B = P0^0; // Segment B (P0.0) sbit SEG_C = P1^5; // Segment C (P1.5) sbit SEG_D = P0^3; // Segment D (P0.3) sbit SEG_E = P0^1; // Segment E (P0.1) sbit SEG_F = P1^2; // Segment F (P1.2) sbit SEG_G = P1^7; // Segment G (P1.7) sbit SEG_DP = P0^4; // Decimal Point (P0.4)
// Define digit common pins sbit DIGIT1 = P1^4; // Common Anode 1 (P1.4) sbit DIGIT2 = P1^1; // Common Anode 2 (P1.1) sbit DIGIT3 = P1^0; // Common Anode 3 (P1.0)