I use a Cypress Fx2. It's no problem to write a value to dcf.sekunde but if i set dcf.minute to 0 or such a other value, the controller will stops/crash.
I'm not sure if the struct definition is correct or if i must reserver a address block for it. i hope someone can help me.
Thanks
Sorry for my bad English.
FX2_DCF-Clock.h
typedef xdata struct signal { unsigned char sekunde; unsigned char minute; unsigned char stunde; unsigned char tag; unsigned char wochentag; unsigned char monat; unsigned char jahr; unsigned char synkro; unsigned int fehler_zaehler; }tdcf; extern tdcf dcf;
.
FX2_DCF-Clock.c
txdata tdcf dcf;
if(dcf.sekunde>59) { dcf.synkro=KEINSYNK; dcf.sekunde=0;
crash/stop
dcf.minute=0; dcf.stunde=0; }
I could start looking, but here is a chance for Mr. Smoked Sardine who claims to know (where in) the C standard regarding such (is) to be helpful for a change.
Adhering to the give a man a fish.... philosopy I think it would be an excellent exercise for you to open up that lovely new copy of the 'C' standard you've just bought and take a look yourself.
All I can say is I have never seen the dual naming seen above.
I see.
typedef xdata struct { .... }tdcf; is the 'normal' construct
I'm not sure I'm familiar with your definition of 'normal'.