| ??? 11/16/06 20:35 Read: times |
#128120 - finally I found Responding to: ???'s previous message |
out that this is not working (my original posting)
#define XTAL 22118400 #define MACHINE_CYCLE 12 #define TMR_OV_SEC XTAL/MACHINE_CYCLE #define F40TH_OF_SECOND TMR_OV_SEC * 0.025 #define TIME_SCND 40 #define CLOCK_RELOAD 65536-F40TH_OF_SECOND+14 and this is fine #define XTAL 22118400 #define MACHINE_CYCLE 12 #define TMR_OVERFLOW_SCND (XTAL / MACHINE_CYCLE) #define TMR_40TH (TMR_OVERFLOW_SCND / 40) #define TMR_RELOAD_VALUE ((65536 - TMR_40TH)+10) #define TIMER_RELOAD_H (TMR_RELOAD_VALUE / 256) #define TIMER_RELOAD_L (TMR_RELOAD_VALUE % 256) @ Erik, sorry for confusing you and thanks to all the others. Yes, 70% I'm doing ASM and not C, sorry again. |
| Topic | Author | Date |
| SDCC how to | 01/01/70 00:00 | |
| erm dunno but | 01/01/70 00:00 | |
| Errr | 01/01/70 00:00 | |
| Aside: XTAL | 01/01/70 00:00 | |
| no no | 01/01/70 00:00 | |
| Missing the point | 01/01/70 00:00 | |
| basic C | 01/01/70 00:00 | |
| preprocessor does not do it! | 01/01/70 00:00 | |
| Thanks Andy | 01/01/70 00:00 | |
| Why floating point? On an 8051? | 01/01/70 00:00 | |
| yeah | 01/01/70 00:00 | |
| preprocessor does not do it! | 01/01/70 00:00 | |
| sorry but its still not working | 01/01/70 00:00 | |
| expand and see | 01/01/70 00:00 | |
| Not quite... | 01/01/70 00:00 | |
| Do it by hand! | 01/01/70 00:00 | |
| ... or let the preprocessor do it for you | 01/01/70 00:00 | |
| to make things more clear | 01/01/70 00:00 | |
| Show your expansion! | 01/01/70 00:00 | |
| preprocessor output | 01/01/70 00:00 | |
| what you miss ... | 01/01/70 00:00 | |
| I don't understand your point, but... | 01/01/70 00:00 | |
| finally I found | 01/01/70 00:00 | |
| you are trying to be too good | 01/01/70 00:00 | |
| I'd guess.... | 01/01/70 00:00 | |
| wow | 01/01/70 00:00 | |
| I know that, but they are similar enough to .. | 01/01/70 00:00 | |
one more time | 01/01/70 00:00 |



