Kfir Maymon
Member level 1
- Joined
- Sep 20, 2013
- Messages
- 40
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Location
- Israel
- Activity points
- 315
hey im tring to resolve sothing plz help
this code is working great:
this is not way???
im useing royary encoder as a switch and osilloscope to monitor the two ch so i know they going high and low
this code is working great:
void init() {
ANSEL =0X00;
ADCON0= 0X00;
CMCON = 0X07;
TRISC=0x03 ;
TRISA=0xff;
PORTC=0x00;
}
int newread=0;
void main()
{
init();
while(1)
{
if(PORTA.F5==1)
{
PORTC.F3=1;
}
if(PORTA.F5==0)
{
PORTC.F3=0;
}
if(PORTA.F4==1)
{
PORTC.F4=1;
}
if(PORTA.F4==0)
{
PORTC.F4=0;
}
}
}
this is not way???
void init() {
ANSEL =0X00;
ADCON0= 0X00;
CMCON = 0X07;
TRISC=0x03 ;
TRISA=0xff;
PORTC=0x00;
}
int newread=0;
void main()
{
init();
while(1)
{
if(PORTA.F5==1 && PORTA.F4==1)
{
PORTC.F3=1;
}
if(PORTA.F5==0 && PORTA.F4==0)
{
PORTC.F3=0;
}
}
}
im useing royary encoder as a switch and osilloscope to monitor the two ch so i know they going high and low