Page 1 of 1
Which pin(s) are used for PWM?
Posted: Wed Sep 27, 2017 3:46 pm
by fapplin
Which pin(s) are used for PWM?
Code: Select all
Number# Name Number# Name
1 SYS_3.3V 2 VDD_5V
3 I2C0_SDA / GPIOA12 4 VDD_5V
5 I2C0_SCL / GPIOA11 6 GND
7 GPIOG11 8 UART1_TX / GPIOG6
9 GND 10 UART1_RX / GPIOG7
11 SPI1_MOSI/GPIOA15 12 GPIOL11
13 SPI1_MISO/GPIOA16 14 GND
15 SPI1_CLK/GPIOA14 16 SPI1_CS/GPIOA13
17 SYS_3.3V 18 NC
Re: Which pin(s) are used for PWM?
Posted: Wed Sep 27, 2017 5:46 pm
by guidol
search on the page
http://wiki.friendlyarm.com/wiki/index.php/NanoPi_Duofor PWM and you will find the following:
Pin silk screen Name Linux gpio
DRX DEBUG_RX(UART_RXD0)/GPIOA5/
PWM0 5
Re: Which pin(s) are used for PWM?
Posted: Wed Sep 27, 2017 6:05 pm
by fapplin
I'm using the mini shield. Is it accessible via the 2 x 9 header?
Frank
Re: Which pin(s) are used for PWM?
Posted: Wed Sep 27, 2017 6:08 pm
by fapplin
Does that means it's accessible as DEBUG_RX on the Debug UART port?
Re: Which pin(s) are used for PWM?
Posted: Wed Sep 27, 2017 6:39 pm
by guidol
If I take a look at the picture
http://wiki.friendlyarm.com/wiki/index. ... i_Duo3.jpgI personally would think so....but I didnt really know it

In the schematic at
http://wiki.friendlyarm.com/wiki/images ... 0_1706.pdfthere are only 2 Pins for PWM:
PA5/UART0_RX/
PWM0/PA_EINT5
PWM1/GPIOA6
PS: the Schematic is text-searchable with Ctrl-F

Re: Which pin(s) are used for PWM?
Posted: Wed Sep 27, 2017 7:12 pm
by fapplin
By this image:
[img]
http://wiki.friendlyarm.com/wiki/images ... uo_PCB.png[/img]
I would guess it's the RX pin, but I just don't know, either.
I hope we get an answer.

Re: Which pin(s) are used for PWM?
Posted: Fri Sep 29, 2017 2:49 pm
by fapplin
I confirmed, today, the RX pin on the debug UART is used for PWM by connecting up a servo and using the gpio utility installed on the NanoPi's OS.
I used this tutorial for the Raspberry Pi - figuring that WiringNP on the NanoPi was a variation of WiringPi on the Raspberry Pi. The only variation I think would be that the NanoPi's PWM runs at 24MHz,
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor/softwaregpio -g mode 5 pwm
gpio pwm-ms
gpio pwmc 240
gpio pwmr 2000
gpio -g pwm 5 100
gpio -g pwm 5 150
gpio -g pwm 5 200