JAL manual - library : jseven

previous up next

The jseven library provides declarations for seven segment display handling.

The library first includes jsevenp which contains the IO pin assignment. A local copy of this file can be adapted to accomodate a different IO pin assignment.

The the default jsevenp assumes that the segments a .. g will be connected to the bits 0 .. 6, the decimal point to bit 7, each segment turned on by a logical 1 (bit true).

The following constants (from jsevenp) define the individual segements

   const byte seven_segment_a
   const byte seven_segment_b
   const byte seven_segment_c
   const byte seven_segment_d
   const byte seven_segment_e
   const byte seven_segment_f
   const byte seven_segment_g
   const byte seven_segment_dp       

The following constants define the patterns for the values 0 .. 15, and the space:

   const byte seven_space
   const byte seven_value_0
   const byte seven_value_1
   const byte seven_value_2
   const byte seven_value_3
   const byte seven_value_4
   const byte seven_value_5
   const byte seven_value_6
   const byte seven_value_7
   const byte seven_value_8
   const byte seven_value_9
   const byte seven_value_a
   const byte seven_value_b
   const byte seven_value_c
   const byte seven_value_d
   const byte seven_value_e
   const byte seven_value_f

The following routine returns the seven segment value corresponding to the argument x:

   function seven_from_digit( byte in x ) return x

previous up next