Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
12Next
Return to list New
View: 10157|Reply: 11

i am trying to control PWM with my orangepi zero

[Copy link]

4

Threads

6

Posts

49

Credits

Novice

Rank: 1

Credits
49
Post time 2016-11-27 16:36:37 | Show all posts |Read mode
HI
i am trying to find any library by which i can control orangepizero PWM0 but i am failed please can any one help me to find?
i am new with these devices. and once i found blinky.c program but i tried to understand that code but fail.
Please guide me

10

Threads

220

Posts

2000

Credits

Gold member

Rank: 6Rank: 6

Credits
2000
Post time 2017-4-1 13:36:38 | Show all posts
Edited by nopnop2002 at 2017-4-3 23:02
iboguslavsky replied at 2017-3-25 05:59
There is a new PWM driver available (it uses UART0_RX pin on the UART breakout header):

https://g ...

I made PWM C Library for H3/H2+ Sunxi SoC.
And it can control using command line(pwmc).

https://github.com/nopnop2002/pwmlib-opi


10

Threads

220

Posts

2000

Credits

Gold member

Rank: 6Rank: 6

Credits
2000
Post time 2017-1-23 20:44:53 | Show all posts
Edited by nopnop2002 at 2017-1-23 21:01

The port which can be used in PWM0 is UART0_RX.
UART0_RX (PA5) is middle pin of the UART header.
Locating the UART header is here.

https://linux-sunxi.org/Xunlong_Orange_Pi_One

1

Threads

4

Posts

21

Credits

Novice

Rank: 1

Credits
21
Post time 2017-1-22 10:25:46 From the mobile phone | Show all posts
i need help Android Qpython3 How to gpio pin ON/OFF?  what library can work? my board is OPI+2E with Android 4.2

4

Threads

36

Posts

507

Credits

Senior member

Rank: 4

Credits
507
Post time 2017-1-31 19:32:51 | Show all posts
Edited by jps at 2017-1-31 12:34
nopnop2002 replied at 2017-1-23 13:44
The port which can be used in PWM0 is UART0_RX.
UART0_RX (PA5) is middle pin of the UART header.
Loc ...

But acording with this document, the PWM port is:
7PA6 (SIM_PWREN/PWM1/PA_EINT6)
but i can not find the way to control, for example, moving a servo with PWM control. Could you help me?
Thanks in advance.

Orange Pi 2 as a Smart TV
Orange Pi Plus 2e to test projects
Orange Pi Lite for automated aquarium
[url=http://orangepiweb.es]Orange Pi en Castellano[

10

Threads

220

Posts

2000

Credits

Gold member

Rank: 6Rank: 6

Credits
2000
Post time 2017-1-31 21:41:05 | Show all posts
Edited by nopnop2002 at 2017-1-31 21:57
jps replied at 2017-1-31 19:32
But acording with this document, the PWM port is:but i can not find the way to control, for example ...

I have a data seat of H3 here.

http://linux-sunxi.org/images/4/ ... _Datasheet_V1.2.pdf

There is an explanation of PWM in P74, but there are no functions of PWM in PA6.

You can use 16 Channel 12-bit PWM/Servo Driver-I2C interface of PCA9685.It's only $1.8

4

Threads

36

Posts

507

Credits

Senior member

Rank: 4

Credits
507
Post time 2017-2-2 02:51:40 | Show all posts
nopnop2002 replied at 2017-1-31 14:41
I have a data seat of H3 here.

http://linux-sunxi.org/images/4/ ... _Datasheet_V1.2.pdf

Yes, but then, what about this:
PA6 (SIM_PWREN/PWM1/PA_EINT6)


Ths solution with PWM/Servo Driver-I2C interface its good, but i would like to work directly with the GPIO pins. Anyway, thanks for the orientation and your fast response.
Javier
Orange Pi 2 as a Smart TV
Orange Pi Plus 2e to test projects
Orange Pi Lite for automated aquarium
[url=http://orangepiweb.es]Orange Pi en Castellano[

10

Threads

220

Posts

2000

Credits

Gold member

Rank: 6Rank: 6

Credits
2000
Post time 2017-2-2 19:37:56 | Show all posts
jps replied at 2017-2-2 02:51
Yes, but then, what about this:
PA6 (SIM_PWREN/PWM1/PA_EINT6)

I think this is a mistake.

4

Threads

36

Posts

507

Credits

Senior member

Rank: 4

Credits
507
Post time 2017-2-2 22:33:05 | Show all posts
nopnop2002 replied at 2017-2-2 12:37
I think this is a mistake.

Ok, thanks.
Orange Pi 2 as a Smart TV
Orange Pi Plus 2e to test projects
Orange Pi Lite for automated aquarium
[url=http://orangepiweb.es]Orange Pi en Castellano[

0

Threads

3

Posts

20

Credits

Novice

Rank: 1

Credits
20
Post time 2017-3-25 05:59:56 | Show all posts

There is a new PWM driver available (it uses UART0_RX pin on the UART breakout header):

https://github.com/iboguslavsky/pwm-sunxi-opi0.git

Have a look at the examples also.
12Next
Return to list New
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-11-17 07:50 GMT+8 , Processed in 0.040830 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list