??? 10/01/09 10:32 Read: times |
#169327 - re include files Responding to: ???'s previous message |
with the possible exception of the venerable 8051.h, I do not trust 'canned' include files. There is no way in hades that any 'publisher' can test/verify every sfr and every bit definition in the myriad of include files that must be provided to cover the whole spectrum of '51 derivatives. If I have any problem that even to the smallest extent could be related to an error in an include file I immediately check it against the datasheet.
Anyhow, I do not like the standard and do as a rule, while verifying with the datasheet, rework the include file for every new derivative I start working with. my basic beef with the 'standard' include files is that a global search will not necessaerily show every instance of the use of a sfr or a bit. My 'style' is like this sfr SF_TCON = 0x88; // timer control sbit SB_TCON_TF1 = 0x8F; // timer 1 overflow flag sbit SB_TCON_TR1 = 0x8E; // timer 1 on/off control sbit SB_TCON_TF0 = 0x8D; // timer 0 overflow flag sbit SB_TCON_TR0 = 0x8C; // timer 0 on/off control sbit SB_TCON_IE1 = 0x8B; // ext. interrupt 1 edge flag sbit SB_TCON_IT1 = 0x8A; // ext. interrupt 1 type sbit SB_TCON_IE0 = 0x89; // ext. interrupt 0 edge flag sbit SB_TCON_IT0 = 0x88; // ext. interrupt 0 type #define SM_TCON_TF1 0x80 #define SM_TCON_TR1 0x40 #define SM_TCON_TF0 0x20 #define SM_TCON_TR0 0x10 #define SM_TCON_IE1 0x08 #define SM_TCON_IT1 0x04 #define SM_TCON_IE0 0x02 #define SM_TCON_IT0 0x01note that every access to TCON will show on a global search and so will every access to TR1 Erik |
Topic | Author | Date |
Timer 2 Interrupt Enable? | 01/01/70 00:00 | |
do you actually clock the T2EX? | 01/01/70 00:00 | |
Yes I am | 01/01/70 00:00 | |
prototype visible to main | 01/01/70 00:00 | |
Some Differences Found in Documentation | 01/01/70 00:00 | |
who know the most about NXP chips ? | 01/01/70 00:00 | |
Can't Get Your Point | 01/01/70 00:00 | |
YES | 01/01/70 00:00 | |
One Problem Fixed | 01/01/70 00:00 | |
wrong include | 01/01/70 00:00 | |
This was the Exact Problem | 01/01/70 00:00 | |
re include files![]() | 01/01/70 00:00 | |
Please check .RST file | 01/01/70 00:00 |