Part Number: MSP430G2553
Tool/software: Code Composer Studio
Hi there,
as part of a own project i want to interprete the DCF77 signal, which is a radiosignal in germany containing the current time and alot more informations. As a start I want to detect a change of the voltage level in the signal.
About the DCF77 signal: It remains in digital high state and drops to digital low for a short part of a second. If the duration takes 100 ms it is adequate to a "0", if it takes 200 ms it is a "1". That way there is one bit in every second of the signal.
Setup: I use a DCF77 module from Conrad. The picture below shows the setup with the MSP430 Launchboard.
The signal output signal (I marked it with the letter "d" and the inverted with a d with a bar over it) comes from an open npn transistor. With my osci I am able to detect the signal:
As the voltage is pretty low i am using an internal pullup restitor of the msp. My code is the following one:
#include <msp430.h>
#define Sensor BIT7
#define LED BIT0
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1DIR = 0xFF; // all Ports to Output
P1DIR &= ~Sensor; // Sensor port to Input
P1REN = Sensor; // Enable internal pull-up/down resistor
P1OUT = 0; // All Outputs to digital low
P1OUT = Sensor; // Select pull-up mode for Sensor port
P1IE = Sensor; // interrupt enabled
P1IES = Sensor; // Hi/lo edge
P1IFG &= ~Sensor; // IFG cleared
__bis_SR_register(GIE);
}
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
P1IFG &= ~Sensor; // IFG cleared
P1OUT ^= LED;
}
My problem is that the interrupt doesn't occur. Could it be that the internal pullup isn't enough or did I missunderstand the usage of it? Or does someone see a mistake in my code?
I am thankfull for every hint, this problem bothers me since a while.

