I'm writing a program in assembly language that performs an action triggered by the rising and falling edge of a clock signal.
Solved! Go to Solution.
 
					
				
		
You could generate a slow and somewhat inaccurate clock by driving a GPIO pin high and low from your software, but I don't think that's what you mean./
Read up on the capabilities of the GPT, DTIM and PWM modules. You can program them to generate hardware clocks from your board.
You can also program the DTIM and GPTs to generate an interrupt when an external signal changes state (rising or falling edge) and to capture the exact time that happened.
But that doesn't seem to be what you';re after. I don't understand what you mean by having your code generate a clock and perform actions based on that same clock. It seems like you have a project to emulate some hardware design in software, and the project hasn't been describer or understood properly.
You can program a hardware timer to generate interrupts and then have the interrupt service routine do whatever is needed.
Tom
 
					
				
		
You could generate a slow and somewhat inaccurate clock by driving a GPIO pin high and low from your software, but I don't think that's what you mean./
Read up on the capabilities of the GPT, DTIM and PWM modules. You can program them to generate hardware clocks from your board.
You can also program the DTIM and GPTs to generate an interrupt when an external signal changes state (rising or falling edge) and to capture the exact time that happened.
But that doesn't seem to be what you';re after. I don't understand what you mean by having your code generate a clock and perform actions based on that same clock. It seems like you have a project to emulate some hardware design in software, and the project hasn't been describer or understood properly.
You can program a hardware timer to generate interrupts and then have the interrupt service routine do whatever is needed.
Tom
