1   /*******************************************************************************
2  
3   Author  :  Mauro  Laurenti
4   Version  :  1.0
5   Created  on  Date  :  4/9/2006
6   Last  update      :  09/01/2014
7  
8   CopyRight  2006-2014  all  rights  are  reserved
9  
10   ********************************************************
11   SOFTWARE  LICENSE  AGREEMENT
12   ********************************************************
13  
14   The  usage  of  the  supplied  software  imply  the  acceptance  of  the  following  license.
15  
16   The  software  supplied  herewith  by  Mauro  Laurenti  (the  Author)  is  intended  for
17   use  solely  and  exclusively  on  Microchip  PIC  Microcontroller  (registered  mark).
18   The  software  is  owned  by  the  Author,  and  is  protected  under  applicable
19   copyright  laws.  All  rights  are  reserved.
20   Any  use  in  violation  of  the  foregoing  restrictions  may  subject  the
21   user  to  criminal  sanctions  under  applicable  laws,  as  well  as  to  civil  liability
22   for  the  breach  of  the  terms  and  conditions  of  this  license.
23   Commercial  use  is  forbidden  without  a  written  acknowledgment  with  the  Author.
24   Personal  or  educational  use  is  allowed  if  the  application  containing  the
25   following  software  doesn't  aim  to  commercial  use  or  monetary  earning  of  any  kind.
26  
27   THIS  SOFTWARE  IS  PROVIDED  IN  AN  "AS  IS"  CONDITION.  NO  WARRANTIES,
28   WHETHER  EXPRESS,  IMPLIED  OR  STATUTORY,  INCLUDING,  BUT  NOT  LIMITED
29   TO,  IMPLIED  WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR  A
30   PARTICULAR  PURPOSE  APPLY  TO  THIS  SOFTWARE.  THE  AUTHOR  SHALL  NOT,
31   IN  ANY  CIRCUMSTANCES,  BE  LIABLE  FOR  SPECIAL,  INCIDENTAL  OR
32   CONSEQUENTIAL  DAMAGES,  FOR  ANY  REASON  WHATSOEVER.
33  
34   *******************************************************************************/
35  
36  
37   #include &lsaquo PIC18F4550_config.h&rsaquo
38  
39   #define  LCD_DEFAULT
40   #include &lsaquo LCD_44780.h&rsaquo
41   #include &lsaquo LCD_44780.c&rsaquo
42  
43   #include &lsaquo PCF8563.h&rsaquo
44   #include &lsaquo PCF8563.c&rsaquo
45  
46   #include &lsaquo i2cEEPROM.h&rsaquo
47   #include &lsaquo i2cEEPROM.c&rsaquo
48  
49   #include &lsaquo delay.h&rsaquo
50   #include &lsaquo delay.c&rsaquo
51  
52   #include  "init.h"
53   #include  "init.c"
54  
55   #include  "buzzer_test.h"
56   #include  "buzzer_test.c"
57  
58   #include  "led_string_test.h"
59   #include  "led_string_test.c"
60  
61   #include  "LCD_test.h"
62   #include  "LCD_test.c"
63  
64   #include  "EEPROM_test.h"
65   #include  "EEPROM_test.c"
66  
67   #include  "buttons_test.h"
68   #include  "buttons_test.c"
69  
70   #include  "analog_test.h"
71   #include  "analog_test.c"
72  
73   #include  "RS232_test.h"
74   #include  "RS232_test.c"
75  
76   #include  "RTC_test.h"
77   #include  "RTC_test.c"
78  
79  
80   void  main  (void){
81  
82           unsigned  char  number_of_failures  =  0;
83  
84           init  ();
85  
86           beep_test  ();
87  
88           led_test  ();
89  
90           LCD_backlight_test  ();
91           LCD_hello_test  ();
92  
93           number_of_failures  +=  eeprom_test  ();
94  
95           number_of_failures  +=  RTC_test  ();
96  
97           number_of_failures  +=  RS232_test  ();
98          
99           analog_trimmer_test  ();
100  
101           analog_light_test  ();
102  
103           analog_temp_test  ();
104  
105           button_test  ();
106  
107  
108           //  Write  Results
109           delay_ms  (1000);
110  
111           LCD_clear  ();
112  
113           if  (number_of_failures &rsaquo   0)
114                   write_message_LCD  ("SYSTEM  TEST  FAIL");
115           else
116                   write_message_LCD  ("SYSTEM  TEST  PASS");
117  
118            while(1){     
119                  
120           }
121   }