Info about Pyboard v1.1 I/O

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
scardig
Posts: 20
Joined: Wed Jan 10, 2018 8:32 am

Info about Pyboard v1.1 I/O

Post by scardig » Wed Jan 10, 2018 8:48 am

Hello,

I'm asked to evaluate the Pyboard v1.1 as the controller board for a demo project. At the moment the main requirements are related to the I/O channels in two use cases:

CASE 1:
=====
6x digital inputs, 1x UART (with RTS CTS flow control)

CASE 2:
=====
1x ADC, 1x UART (with RTS CTS flow control), 3x digital inputs, 3x digital outputs, 1x DAC

Can you confirm the suitability of the Pyboard v1.1 for the above requirements ? Any advice ?

Thanx

User avatar
dhylands
Posts: 3506
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Info about Pyboard v1.1 I/O

Post by dhylands » Wed Jan 10, 2018 4:47 pm

The documentation for the UART shows how to initialize a UART with flow control:
http://docs.micropython.org/en/latest/p ... .UART.init

and the board definition file for the PYBV11 shows that UARTs 2 & 3 have hardware flow control.

This image shows the digital/analog pins which are available:
https://store.micropython.org/product/PYBv1.1#image5

The RTS/CTS pins aren't shown there, but from the board definition file:

Code: Select all

#define MICROPY_HW_UART2_RTS    (pin_A1)
#define MICROPY_HW_UART2_CTS    (pin_A0)
#define MICROPY_HW_UART3_RTS    (pin_B14)
#define MICROPY_HW_UART3_CTS    (pin_B13)
Disclaimer: I haven't personally used hardware flow control.

scardig
Posts: 20
Joined: Wed Jan 10, 2018 8:32 am

Re: Info about Pyboard v1.1 I/O

Post by scardig » Wed Jan 10, 2018 4:56 pm

Thanx for the answer. Based on the above requisites, do you think that the following pin configuration is a viable choice:


CASE 1
=====

1x UART: Y9, Y10 (+ flow control Y6, Y7)
6x digital input: Y8, X9, X10, Y1, Y2, Y3

CASE 2
=====

1x ADC : X1
1x UART: Y9, Y10 (+ flow control Y6, Y7)
3x digital input: Y8, X9, X10
1x DAC: X6
3x digital output: Y1, Y2, Y3

[quote=dhylands post_id=24513 time=1515602861 user_id=81]
The documentation for the UART shows how to initialize a UART with flow control:
http://docs.micropython.org/en/latest/p ... .UART.init

and the board definition file for the PYBV11 shows that UARTs 2 & 3 have hardware flow control.

This image shows the digital/analog pins which are available:
https://store.micropython.org/product/PYBv1.1#image5

The RTS/CTS pins aren't shown there, but from the board definition file:[code]#define MICROPY_HW_UART2_RTS (pin_A1)
#define MICROPY_HW_UART2_CTS (pin_A0)
#define MICROPY_HW_UART3_RTS (pin_B14)
#define MICROPY_HW_UART3_CTS (pin_B13)
[/code]

Disclaimer: I haven't personally used hardware flow control.
[/quote]

User avatar
pythoncoder
Posts: 4793
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Info about Pyboard v1.1 I/O

Post by pythoncoder » Thu Jan 11, 2018 5:44 am

Pins for hardware flow control are in the docs. I have successfully used this feature via the pyb library.
Peter Hinch

scardig
Posts: 20
Joined: Wed Jan 10, 2018 8:32 am

Re: Info about Pyboard v1.1 I/O

Post by scardig » Thu Jan 11, 2018 9:11 am

Hello Peter,

thanx for the answer. Can you give me an opinion related to the pin configuration in the above post (CASE 1 and CASE 2) ?
pythoncoder wrote:
Thu Jan 11, 2018 5:44 am
Pins for hardware flow control are in the docs. I have successfully used this feature via the pyb library.

User avatar
pythoncoder
Posts: 4793
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Info about Pyboard v1.1 I/O

Post by pythoncoder » Thu Jan 11, 2018 10:01 am

Both look fine to me. All pins on the long sides of the Pyboard can be used for GPIO if they aren't being employed for their specialist purposes. The drawing lists limitations on the pins on the short side of the board but you aren't using those.
Peter Hinch

scardig
Posts: 20
Joined: Wed Jan 10, 2018 8:32 am

Re: Info about Pyboard v1.1 I/O

Post by scardig » Thu Jan 11, 2018 10:43 am

So, for example, would it be possible to use X1 X2 for UART, X3 as GPIO, X4 as GPIO, X5 as DAC , X6 as GPIO and X7 as ADC ? (to know if I can mix pins used for their special function and used as GPIOs even when they are placed in different columns in the drawing)

pythoncoder wrote:
Thu Jan 11, 2018 10:01 am
Both look fine to me. All pins on the long sides of the Pyboard can be used for GPIO if they aren't being employed for their specialist purposes. The drawing lists limitations on the pins on the short side of the board but you aren't using those.

User avatar
pythoncoder
Posts: 4793
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Info about Pyboard v1.1 I/O

Post by pythoncoder » Thu Jan 11, 2018 6:05 pm

Yes. Each pin can individually be specified as GPIO if you aren't using any of that pin's specialised functions.
Peter Hinch

Post Reply