It is currently 19 Feb 2019 14:28

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 14 Jul 2007 09:16 
Offline

Joined: 12 Jul 2007 19:17
Posts: 8
Hi there,

I'm working on transmitting data using an RF module with a PT2262 encoder. Quick question the only example ive found uses manchester coding direct and RF module.
Do i need to manchester code my data if im using an encoder?
If not how should i start the coding?
Thanks
Di


Top
 Profile  
 
 Post subject:
PostPosted: 27 Nov 2009 17:51 
Offline

Joined: 10 May 2009 15:14
Posts: 54
Location: Netherlands
I am also interested in PT2262 encoding and PT2272 decoding IC for 433Mhz tranmsitters and receivers. I have read the PT2262 datasheet and studied the output signal. It sends 12 bits, (that correspondent with the logical input on 12 pins) and a syncbit. A logical 0 on the input gives 10001000, a logic 1 on the input gives 11101110 and a floating input gives 10001110 output signal. You can see that this signal is not as balanced as manchester code (in which each bit is encoded as 01 or 10)

I have generated code in MikroC that emulates the PT2262 output signal. And it worked well with a PT2272 receiver and with my wirelessly controlled wall socket.
/* Project name:
     Jaspers PT2262 emulator
 * Description:
     The code below generates a PT2262 output signal and makes D1 '1'
 * Test configuration:
     MCU:             PIC16F887
     Dev.Board:       EasyPIC5
     Oscillator:      HS, 8 MHz
     Ext. Hardware:   433MHz AM transmitter (those cheap 3$ things) on RC3 pin
     SW:              mikroC PRO for PIC
 * Note: the 433Mhz transmitter is supplied with GND and +5V
*/

sbit RFOUT at RC3_bit;  //alias
char a, i, number;

void sendbit(char a){
  if(a==0){         //pin low
    RFOUT=1;
    delay_us(150);
    RFOUT=0;
    delay_us(3*150);
    RFOUT=1;
    delay_us(150);
    RFOUT=0;
    delay_us(3*150);
  }
  if(a==1){     //pin high
    RFOUT=1;
    delay_us(3*150);
    RFOUT=0;
    delay_us(150);
    RFOUT=1;
    delay_us(3*150);
    RFOUT=0;
    delay_us(150);
  }
  if(a==2){             //pin floating
    RFOUT=1;
    delay_us(150);
    RFOUT=0;
    delay_us(3*150);
    RFOUT=1;
    delay_us(3*150);
    RFOUT=0;
    delay_us(150);
  }
}
 void syncbit(){
   RFOUT=1;          // sync bit
   delay_us(150);
   RFOUT=0;
   delay_us(7*150);
 }


void main(){
ANSEL=ANSELH=0;
TRISC=0;
PORTC=0;
number=4;

  while(1){
    for(i=0;i<number;i++){
        sendbit(0);//address A0      0 is low, 1 is high, 2 is floating pin
        sendbit(0);//address A1
        sendbit(0);//address A2
        sendbit(0);//address A3
        sendbit(2);//address A4
        sendbit(2);//address A5
        sendbit(2);//address A6 /data D5
        sendbit(2);//address A7 /data D4
        sendbit(0);//address A8 /data D3
        sendbit(0);//address A9 /data D2
        sendbit(1);//data D1
        sendbit(0);//data D0
        syncbit();
    }
  }
 
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: