Lord Loh.
Full Member level 4
I am trying to write a code with macros that is independent of the crystal frequency. I am trying to write delay routines such that by once specifying the crystal frequency like
I get MPASM do conditional assembly to select the right type of subroutine that would give me the desired delay. I would like to get MPASM do the calculation of the value that should go into the timer register.
However once I try to
the value shall become of a floating point type. How do I proceed now. I then tried to
the WREG was now 0x00.
Has anyone tried any such assembly?
Could anyone please guide me here....
Thanks in advance.
Code:
Xtal EQU 8
I get MPASM do conditional assembly to select the right type of subroutine that would give me the desired delay. I would like to get MPASM do the calculation of the value that should go into the timer register.
However once I try to
Code:
instructionperiod=4/Xtal
the value shall become of a floating point type. How do I proceed now. I then tried to
Code:
movlw instructionperiod
Has anyone tried any such assembly?
Could anyone please guide me here....
Thanks in advance.