Sorry Udo - i'm getting you confused i think!
I am yet to successfully capture the sequence of long and short pulses using the arduino and convert them into 1s and 0s. I have played around with this code (adapted from
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1195830186/0#0) in an attempt to do this:
#define icpPin 8 // ICP input pin on arduino
volatile unsigned int Value; // this stores the current ICR1 value
int current_bit = 1;
/* ICR interrupt vector */
ISR(TIMER1_CAPT_vect){
Value = ICR1; // save the input capture value
if(Value < 750) {
Serial.print(current_bit);
} else {
if(current_bit == 1) {
current_bit = 0;
} else {
current_bit = 1;
}
Serial.print(current_bit);
}
}
void setup() {
Serial.begin(19200);
pinMode(icpPin, INPUT); // ICP pin (digital pin 8 on arduino) as input
TCCR1A = 0 ; // this register set to 0!
TCCR1B =_BV(CS11); // NORMAL MODE!!, prescaller 8, rising edge ICP1 - this works
TCCR1B |= _BV(ICES1); // enable input capture
TIMSK1 = _BV(ICIE1); // enable input capture interrupt for timer 1
TIMSK1 |= _BV(TOIE1); // enable overflow interrupt to detect missing input pulses
Serial.print("Finished setup\r\n");
}
I believe it is manchester code because when i captured the raw signal from the RF receiver with my soundcard and analysed it, i assumed it was manchester just by how it looked, and when i decoded it to ones and zeros, i could see the weather station's station id (which is used to sync the weather transmitter to its display base station) at the start of the packet, and i also captured packets for differing wind directions (set anemometer to north, capture packet, set anemometer to south, capture packet, etc) with my soundcard, and i have determined which parts of the packet changed to represent the wind direction.
the type of manchester code, according to the PDF you posted, is "2.2.3 Manchester"
so what i need to do, is work out the arduino code that will capture the input, work out whether it is high/low transition and the length of the pulse, so i can determine if its a one or zero.
as i mentioned earlier, i think i can determine the 1 or 0 as follows: the series of initial short pulses are 1s, then there is one long pulse which is a 0. from then on, if the pulse width is short, the it is the same as the previous bit (0), else if its long, it's the opposite bit (1). if i continue in this fashion - short pulse means same as previous pulse, long pulse means the opposite bit - i should have decoded the stream to 1s and 0s. from there, i can process it to determine weather station id, and the wind, rain value and temp.
the code above is trying to achieve what i just described.
the 'chips' on the weather transmitter are just black blobs (of silicon?). i have googled some of the codes on the PCB, but get no results. the weather station is this one:
http://www.home-weather-stations-guide.com/thermor-weather-station.htmli believe this can be done, somehow! its quite frustrating at the moment - i have captured the packets using my soundcard, decoded them manually on paper and worked out what they mean and how they translate to the weather. i just need to get the arduino to do this!