PWM update
This commit is contained in:
parent
72c34b6ba4
commit
198feef12f
3 changed files with 7 additions and 8 deletions
|
@ -3,12 +3,14 @@
|
|||
#include <b15f/b15f.h>
|
||||
#include <b15f/plottyfile.h>
|
||||
|
||||
const char PLOT_FILE[] = "plot.bin";
|
||||
|
||||
/*
|
||||
* Erzeugt ein PWM Signal an PB4 mit 100KHz.
|
||||
* Beste Frequenz: 31300
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
|
||||
B15F& drv = B15F::getInstance();
|
||||
std::cout << "TOP: " << (int) drv.pwmSetFrequency(100000) << std::endl;
|
||||
drv.pwmSetValue(40);
|
||||
std::cout << "TOP: " << (int) drv.pwmSetFrequency(31300) << std::endl;
|
||||
drv.pwmSetValue(127);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue