This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to define gpio pins and generate pwm on gpio pins?

Hi There, i am new to nrf51822 and new to program this kind of controller.I searched over the website, I couldn't find a good introductory documentation for programming the nrf51822, specifically the nrf51-dk. i have two problems 1.i want to connect a led and buzzer to gpio pins of nrf51822 so how to declare gpio pins in program for ex. suppose if i press button on nrf board the buzzer connected to gpio pins (for (ex. p0.0) should be on (make some sound). 2.i want to generate a pwm on gpio pin (for ex on p0.1) how to declare this pin as output for pwm how to use functions to declare gpio,led and other stuff as i gone through the tutorial it is not well defined and the tutorials are very much confused and easy to understandable can anybody give me the good explnation about this a good tutorial with each and every line explained will be great help!! Regards, Abhijeet Kapse

Parents Reply
  • Thanks for your reply i have replaced the BSP_LED_0and BSP_LED_1 with gpio pins 5 and 6 and i connected pin 6 to pwm input of vibration motor.but my vibration motor is not running .the gpio pins give me pwm voltage between 0 to 2.9v.how to increases pwm output voltage? how to change the period and duty cycle in this program? what are the changes i have to make in my program?

Children
No Data
Related