A few beginner questions- pin id, pull_ups, USB connector

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
keithostertag
Posts: 16
Joined: Sun Dec 17, 2017 3:46 pm

A few beginner questions- pin id, pull_ups, USB connector

Post by keithostertag » Tue Dec 19, 2017 5:13 am

As a beginner I'm finding the documentation a bit overwhelming. I've never worked with digital chips before.

Where do I find (how do I determine) which pins can be used for GPIO? .... any of the X or Y pins without exception?

Where do I look to identify which pins can be configured to use an internal pull_up resistor? Will micropython give me an immediate error if I try to configure them wrong? I worry that I might burn out something by wiring it wrong.

My boards micro-USB connector seems intermittent/marginal. Is there a way to bypass it... for instance, are there pins that I could use to hardware a different connector?

Please let me know if there is a more appropriate forum for such beginner questions. I am looking at the Quick Reference/pinout jpg and the schematic. I am connecting to my board using Linux(Debian) via the Screen program with MicroPython v1.9.2-87-gda8c4c26 on 2017-09-13; PYBv1.1 with STM32F405RG.

Thanks,
Keith

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

Re: A few beginner questions- pin id, pull_ups, USB connector

Post by pythoncoder » Wed Dec 20, 2017 7:52 am

I use this page as a constant reference. All the GPIO pins on the long sides of the board are entirely free for use. The notes at the bottom right detail some restrictions on the pins on the short edge of the board. All GPIO lines can be specified with pullups or pull-downs, but these are fairly high value resistors - about 50KΩ if I remember correctly.

You won't zap anything merely by a failed attempt to configure a pin, but it's a bad idea to apply a low impedance voltage source to a pin configured as an output. That said, Pyboards are pretty robust.

As for the USB connector I don't recall anyone else reporting problems. Clearly some care is required using a PCB mounted connector - an option would be to leave a short USB extension cable permanently connected. But if it's genuinely intermittent you might have a rare instance of a defective unit.
Peter Hinch
Index to my micropython libraries.

keithostertag
Posts: 16
Joined: Sun Dec 17, 2017 3:46 pm

Re: A few beginner questions- pin id, pull_ups, USB connector

Post by keithostertag » Wed Dec 20, 2017 2:47 pm

Thank you Peter, that's very helpful.

I also going to be studying the REAME.md file on your Micropython-scheduler github page - very instructive!

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

Re: A few beginner questions- pin id, pull_ups, USB connector

Post by pythoncoder » Thu Dec 21, 2017 10:09 am

The scheduler I wrote is now effectively obsolete, superseded by the official uasyncio module which is faster and more RAM-efficient. An unofficial tutorial may be found here.
Peter Hinch
Index to my micropython libraries.

Post Reply