Tuesday, November 22, 2011

Software Progress

The photo on the right will be explained at the end of this post. This is the culmination of a few weeks of struggle in dealing with timers.

In my time struggling and putting off in dealing with the timers, I decided to do some research on anyone else who had dealt with timers. The work that I had dine already did not reveal timers to work with interrupts. The link that I found led to this forum post. The post described someone who was using the capture and compare module, in conjunction with a timer, to invert a pin. I did some testing with the code provided, and it worked just fine. I fine tuned it to respond at a 500 kHz frequency, as seen in the bottom left corner of the display.

Now, the reason why there is a gap in the cycles is that I wanted to do a test regarding the ability to turn off and on the timer, and have it not affect the other parts. This worked beautifully, as seen in the photo above. What this means is that now I need to edit my code, with this new addition, to run the PWM cycling from the foreground to the background.

No comments:

Post a Comment