/[H9]/trunk/Embedded/main.c
ViewVC logotype

Diff of /trunk/Embedded/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 111 by hedin, Fri Nov 30 13:47:05 2007 UTC revision 112 by hedin, Fri Nov 30 16:07:03 2007 UTC
# Line 36  void ad_init(void) Line 36  void ad_init(void)
36          PCFG2=1;          PCFG2=1;
37          PCFG3=1;          PCFG3=1;
38                    
39          //Result is right justified          //Result is left justified
40          ADFM=1;          ADFM=0;
41                    
42          //Fire up for A/D converter module          //Fire up for A/D converter module
43          ADON=1;          ADON=1;
# Line 88  void interrupt interrupt_handler(void) Line 88  void interrupt interrupt_handler(void)
88  }                }              
89    
90  void update_lcd(void)  void update_lcd(void)
91  {  {      
         int i = 0, horizontal = 0, vertical = 0;  
         char alfa[2][LCD_LENGTH];  
           
           
         static char current_row = 0;  
         static char current_char = 0;  
92          char toLCD0[LCD_LENGTH], toLCD1[LCD_LENGTH];          char toLCD0[LCD_LENGTH], toLCD1[LCD_LENGTH];
93          char B1[16];          char B1[LCD_LENGTH];
94            char sprintF[LCD_LENGTH];
95          lcd_goto(0x00);          lcd_goto(0x00);
96          sprintf(toLCD0, "%s", "Ejdesgaard");          sprintf(toLCD0, "%s", "Ejdesgaard");
97          if(RB1)          if(RB1)
# Line 110  void update_lcd(void) Line 105  void update_lcd(void)
105          lcd_puts(B1);          lcd_puts(B1);
106                    
107          lcd_goto(0x40);          lcd_goto(0x40);
108  //      sprintf(toLCD1, "%s", "Test");          sprintf(sprintF,"%08d%08d", global_Pot_Hi, global_Pot_Lo);
109          lcd_puts("Test1");          lcd_puts(sprintF);
110                    
111  }  }
112    
# Line 137  void main() Line 132  void main()
132                  {                  {
133                          global_Pot_Hi = ADRESH;                          global_Pot_Hi = ADRESH;
134                          global_Pot_Lo = ADRESL;                          global_Pot_Lo = ADRESL;
135                          GODONE = 0;                          GODONE = 1;
136                  }                  }
137                                    
138          update_lcd();          update_lcd();

Legend:
Removed from v.111  
changed lines
  Added in v.112

  ViewVC Help
Powered by ViewVC 1.1.20