I'm working on some library code.
I'd like to make it as self configuring as possible so I'd like the code to be able to cater for different SETFREQ settings in the main program.
I'm aware of the predefined constants _08M2, _14M2, etc that enable the code to determine the PICAXE chip.
Does anyone know of a way for the code to determine the current SETFREQ setting?
Reading the PIC configuration registers doesn't seem a complete solution. While you can determine whether an external crystal is being used you can't determine what the crystal frequency is. This would be solved if I could find that the SETFREQ was EM16, EM32, etc.
I'd like to make it as self configuring as possible so I'd like the code to be able to cater for different SETFREQ settings in the main program.
I'm aware of the predefined constants _08M2, _14M2, etc that enable the code to determine the PICAXE chip.
Does anyone know of a way for the code to determine the current SETFREQ setting?
Reading the PIC configuration registers doesn't seem a complete solution. While you can determine whether an external crystal is being used you can't determine what the crystal frequency is. This would be solved if I could find that the SETFREQ was EM16, EM32, etc.