There have been a few requests for a Signal Generator for the OSHW and in response to those requests and the fact that I had a few days leave, I decided to take-up the challenge.
Now I need some willing souls to test it for me I am especially interested in someone that has a logic analyzer and can tell me how accurate it is and what the peak frequency is that it can achieve. I will of course be making all the code available, but right now I consider it to still be in development so I do not want to jump the gun on that.
At this time the interface a 100% drop in replacement for the GHI premium offering, with the following restrictions
Only one SignalGenerator can be generating an async signal. This is not a technical limitation, it is just that I only wrote the code this evening and have not added support for scheduling multiple generators asynchronously. You can of course have multiple instances and fire them, but starting one while another is running will stop the currently running generator.
I have no clue what the peak performance is. I know that the generator can quite accurately generate frequencies in the audible range, I tested that with a music tuner.
Disabling interrupts results in less accurate frequencies. This is due to some tricks I have implemented to improve performance using the interrupts.
I just remembered, in my excitement that it all worked, I forgot to implement the IsActive property. Well I need to get to bed now so that will be tomorrows job.[/ol]
I found the AT91SAM9RL64 (Hydra processor) quite challenging as the timers are very limited and I need to do a number of tricks to get the generator to perform reasonably well at relatively low frequencies. So I am at the point where I need better test equipment to see if I am making things better or worse, I will need to get a late Christmas present
The Firmware and the related DLL can be obtained from my skydrive
To use the generator you can do the following
[ol]Use MFDeploy to deploy the firmware to the Hydra
Reset the Hydra (This is very important)
Create a new project, add a reference to the managed dotnetwarrior.OSHW.Hardware assembly
Write code to use the SignalGenerator[/ol]