[PIC] Schematic of My Project

Status
Not open for further replies.

kvsa

Newbie level 4
Joined
Oct 8, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
45
Hi, Mr.Venkadesh.M
Thanks for your reply,
Here with i attached the schematic


kindly reply
By kvs
 

Hi kvsa you can continue in the same thread itself no need of posting a new thread.. and as jayanth.devarayanadurga said you have to modify the resistors....
The programming part is very simple and you can do whatever you want, I always use HiTech compiler so i am writing on it, you will need MPlab IDE and hitech compiler for compiling purposes..


And did you mean any one of the output shd be high as interlock???
 

if you are going to ucsp then connector also should be there to burn programm.
 


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include<htc.h>
 
#define _XTAL_FREQ 20000000 //  your xtal frequency in hz
//configurations according to operation
 
void main()
{
   TRISC = 0b01100011;
 
   __delay_ms(100);
 
while(1)
{
     if (RC5 == 1 && RC6 == 0) //  with interlock
   {
       RC0 = 1;
      }
     else if(RC6 == 1 && RC5 == 0) // with interlock
      {
        RC1 = 1;
      }
     else   // if both inputs or high or low no output
      {
        RC0 = 0;
        RC1 = 0;
      }
}
}

 
Last edited:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//configurations as per your req...
 
void main()
{
   TRISC = 0b01100011;
   while(1)
     {
         if(RC5 && !RC6)
            {
                RC0 = 1;
                RC1 = 0;
//Holding delay...
            }
 
          else if(!RC5 && RC6 )
             {
              RC0 = 0;
              RC1 = 1;  
//Holding delay
             }
         else
             {
                 RC0 = 0;
                 RC1 = 0;
              }
     }
}

 
Last edited:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//configurations as per your req...
 
void main()
{
   TRISC = 0b01100011;
while(1)
{
   if(RC5 == 1)
       RC0 = 1;
 
   else if(RC6 == 1)
     RC1 = 1;  
}
}


Hi mathe,
If once RC0 = 1 then how it will get turn off??
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…