Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
User Journal

Journal StarWreck's Journal: Edge Capture Working

Finished Writing the code to get the 68HC08 micro-controller to capture both rising and falling edges, determine the time between them that is a logic HIGH (this is based on the number of clock cycles the processor has went through divided by a prescalar), and then calculate the hex value that will result in duplicating the same duty cycle with a logic HIGH and outputting it to a TPM channel. After working out some kinks in the code (if the rising edge is near maximum number of the counter the falling edge will be near ZERO resulting in a "twitch"), its working smoothly. The wheels turn in both directions super fast and very smoothly with lightning fast response... a simple IF statement removed the "twitch". Next up on the agenda: recording the signal so we can "replay" a path.
This discussion has been archived. No new comments can be posted.

Edge Capture Working

Comments Filter:

"A car is just a big purse on wheels." -- Johanna Reynolds

Working...