Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ZOTAC (device :- RC2604323/01G) REMOTE PROTOCOL

Status
Not open for further replies.

vicky001.iith

Advanced Member level 4
Full Member level 1
Joined
Aug 5, 2013
Messages
113
Helped
37
Reputation
74
Reaction score
31
Trophy points
48
Location
INDIA
Visit site
Activity points
721
hello all,
Any one has idea regarding ZOTAC remote decoding. Which protocol ZOTAC (device :- RC2604323/01G) follows ??
 

Hey mathespbe,I read this .. but i want a code for decoding this protocol OR methods to decode .
 

Hey mathespbe,I read this .. but i want a code for decoding this protocol OR methods to decode .

There was an example code in one of the link posted above...
But I don't fine any more details regarding the protocol. You just understand the protocol completely try your own code and update me...
I'm much intersted in this...
 

Actually i am implementing this stuff with PIC18F26K22 micro controller.So i was searching for a C-code. :???:
Any way i am writing code.lets see how it goes :p
 

Hey Venkadesh_M, Remote is IR only.It works on RC-6 protocol(ZOTAC remote which comes with laptop(lenovo)), i also measured it in oscilloscope and found it as RC6 only.
I don't have block diagram,So i will explain you,this is simple only .Output of SM0038 pin is going as input to RB2 pin of PIC 18F26K22.And i am using interrupt to check signal received or not. Vcc for pin2 of SM0038 is 3V.

View attachment DATASHEET.tar.gz
 

Hi this link points about RC-6 protocol
**broken link removed**
According to this, it looks like you have to poll the received signal and if you got the start field you have to start getting the data and address fields...
It uses
"Manchester code (bi-phase) - HIGH to LOW for ACE (1), LOW to HIGH for ZERO (0)
Carrier frequency: 36 KHz"
so easy interfacing shd be write a program to decode whatever coming after start field and fix the code for each key and go on...

If you wanted to do this by interrupt means use a low to high interrupt and when entering diable the interrupt and when exiting after all the datas enable it, use the processed command in your program..
 
Last edited:
Yesterday i made a code which used interrupt to catch the signal and to read it.Its working fine.
Thanks Everyone !!
 

I am sharing the interrupt part and how to count the pulse width part ... :grin:
I am sending the received data through Wi-Fi ..
Code:
void my_isr(void) {
   if (INTCONbits.TMR0IE && INTCONbits.TMR0IF) // Timer_isr   timer0 interrupt
    {
        T0CONbits.TMR0ON = 0; // stop the timer
        INTCONbits.TMR0IF = 0; // clear the interrupt flag
        TMR0H = 0xFE;
        TMR0L = 0xF9;
        T0CONbits.TMR0ON = 1; // start the tim
        var1++;
        if (var1 > 90) {
            var1 = 0;
            event = 0;
            event_2p5 = 0;
            count=addrs;
            addrs=0;
            T0CONbits.TMR0ON = 0; // start the tim
        }
    }
    if (INTCON3bits.INT2IF == 1) // IR  interrupt
    {
        T0CONbits.TMR0ON = 0;

        //if (var1 > 23 && var1 < 30) {
          //  event_2p5 = 1;
            //LED_RED();

        //}
       // if (event_2p5 == 1) {

            data_store[addrs] = var1;
            addrs++;
            if (INTCON2bits.INTEDG2) {
                data_store[addrs] = 1;
                addrs++;
            } else  {
                data_store[addrs] = 0;
                addrs++;
            }
        //}
        var1 = 0;
        TMR0H = 0xFE;
        TMR0L = 0xEB;
        T0CONbits.TMR0ON = 1;

        INTCON2bits.INTEDG2 = ~INTCON2bits.INTEDG2;
        INTCON3bits.INT2IF = 0;
    }

}

void main(void) {
//    unsigned int a = 0;
    unsigned char varw=0,input[4],temp_data[32],temp_var=0,a,bytes[4],b=0,c=0;

    Sys_Init2();//system init
    TMR0L = 0;
    TMR0H = 0;
    LATCbits.LATC5 = 1;

    //*******************************

    WiFiInit();
    //**************************************************
    while (1) {

        LED_ON();
        event = 1;
        while (event);
        LED_OFF();
      /*  varw=19;
        while (temp_var < 32) {
            if (data_store[varw] == 0) {
                temp_data[temp_var] = 0;
                temp_var++;
            }else{
                temp_data[temp_var] = 1;
                temp_var++;
            }
            if(data_store[varw+3] <= 5){
                varw=varw+4;
            }else{
                varw=varw+2;
            }
            
        }
        c=0;
        for(b=0;b<4;b++){
            for(a=c;a<c+8;a++){
                bytes[b]<<=1;
                bytes[b]|=temp_data[a];
            }
            c=c+8;
        }*/
        //*********************************
        send_string_rom("at+rsi_snd=");
        send_byte(sock);
       // send_string_rom(",4,192.168.1.139,8888,");
        send_string_rom(",");
        send_byte(count);
        //send_byte(temp_var);
        send_string_rom(",192.168.1.139,8888,");
        send_string(data_store, count);
        //send_string(bytes,4);
        //send_byte(data_store[19]);
        send_string_rom("\r\n");
        temp_var=0;
        //**********************************
        delay(200);
        for(a=0;a<32;a++){
            temp_data[a]=0;
        }
    }
    send_string_rom("at+rsi_cls=1\r\n");
    while (flag == 0);
    delay(20);
    check();
    clean(recv);
    while (1);

}

- - - Updated - - -

I also got one RC-5 code which is working..
see the attachment..
 

Attachments

  • IRrc5.tar.gz
    59 KB · Views: 82

Hi what do you mean count part, is that your original wave form matches the image else post the number of bits for fields....

Here i am giving the easiest method of decoding the stream


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ISR() // low to high
{
disable_isr();
while(in == 1); // waiting for first start bit high
while(in == 0); // waiting for first start bit low, after this here is just a stream of bits with const period (each bit is consisting of two consecutive bits)....
for ( i = 0; i < nbits; i++)
{
delay_ms(quarter manchester bit);
manchester[i] = in;
delay_ms(quarter manchester bit);
}
manchester2bits();
enable_isr();
}



your work is to find the exact number of bits and the manchester period....

-----------------------------------------------

if you got a stream like 10101010100101

write them as couple 10 10 10 10 10 01 01

if you got 01 then it is 0 if 10 then it is 1 and if it is 00 or 11 then it is invalid stream . . .

Do this in manchester2bits() function.......

-----------------------------------------------
 

count part means after first interrupt happened i am starting a timer of 100us period and i am counting this timer till next interrupt happened.So i am seeing how many times counter has been used. Like if the pulse duration is 800us i should get the value==8 to 9 range. So by using these values i can verify the protocol and also data..

- - - Updated - - -

and can you explain little more about manchester2bit() function ?
 

Hi with this method you cant calculate it exactly, you need to have a precious points to track the exact protocol..!

First of all how much RAM you are having in the controller ??

for example if you have 256 bytes to construct a array of chars, then assume the maximum possible stream length as in the website it is 24ms,

so sample the pin for every 100 ms and store it in a byte location of the array at the end of 25.6 ms you will have 256 bytes by getting this in UART you can draw the waveform of the signal you got...........


Code C - [expand]
1
2
3
4
5
6
for ( i = 0; i < 256; i++)
{
delay_us(50);
sample[i] = in;
delay_ms(50);
}



Do this in ISR............ and send the recieved data via UART

- - - Updated - - -

We are sampling for every half the manchester period so consider the below diagram after start bits

**broken link removed**

100101011001010101011001010101010101100101

is the bit pattern

now align them as pairs

10 01 01 01 10 01 01 01 01 01 10 01 01 01 01 01 01 01 10 01 01

now you can get as i already say,

1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0

now pack them according to number of bits.........
 
By using this method i get the pulse duration length value is (+/-)1 deviated from expected value.
RAM is 4Kbytes.
 

yeah,its almost same only ... i checked in oscilloscope also.HIGH to LOW for ACE (1), LOW to HIGH for ZERO (0) time durations is same for most the pulses.
And i am sending back the same data from an IR emitter and verified it...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top