Input Capture register access in ECT

Started by teleko7 July 17, 2003
Hi.

Im working with a 9s12dp256 and trying to build in a polaroids
ultrasonic transducer, working with the ECT module. But when I try to
copy Input Capture data from a IC register to an "int" variable,
always get 0x00. I know it must be as easy as it seems to be but can
anyone help me??Im getting mad...

I declare registers as contents of constant addresses in a separate
file, e.g.:

#define TC1 (*((volatile int*)(0x0052)))
#define TC2H (*((volatile unsigned char*)(0x0054)))
#define TC2L (*((volatile unsigned char*)(0x0055)))

The file is included in my "main.c" file and can work with these
defines as if they were normal variables, but when trying to copy
data from a register to a variable, like in: int_type_data=TC1; or unsig_char_type_data=TC2H; I only get 0x00.Can anyone else help me??????

T.I.A.

Iban Barrutia