/[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 99 by hedin, Wed Nov 28 17:00:45 2007 UTC revision 100 by hedin, Thu Nov 29 13:23:57 2007 UTC
# Line 4  Line 4 
4    
5  #include "lcd.h"  #include "lcd.h"
6    
7    void AD_init(void)
8    {
9            ADON    = 1;
10    }
11    
12  void rs232_init(void)  void rs232_init(void)
13  {  {
14          SPEN    = 0;    // Serial Port Enable Bit... 0 = disabled          SPEN    = 0;    // Serial Port Enable Bit... 0 = disabled
15          TRISC6  = 0;          TRISC6  = 0;
16          TRISC7  = 1;          TRISC7  = 1;
17          SYNC    = 0; // SYNC switches between async(0) and sync(1) mode.          SYNC    = 0;    // SYNC switches between async(0) and sync(1) mode.
18          SPBRG   = 25;          SPBRG   = 25;
19          TXSTA   = 0x24;          TXSTA   = 0x24;
20          RCSTA   = 0x90;          RCSTA   = 0x90;
# Line 52  void interrupt interrupt_handler(void) Line 56  void interrupt interrupt_handler(void)
56    
57  void main()  void main()
58  {  {
59            AD_init();
60          rs232_init();          rs232_init();
61          pic18_io_init();          pic18_io_init();
62            
63            if(GODONE==0)
64            {
65                    
66            }
67  }  }

Legend:
Removed from v.99  
changed lines
  Added in v.100

  ViewVC Help
Powered by ViewVC 1.1.20