New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using serial on GPIO pins #213
Comments
Hey! You should not use P0_ as they are MCU pin mappings, we have a bunch of user mapped definitions here: MICROBIT_PIN_ https://github.com/lancaster-university/microbit-dal/blob/master/inc/drivers/MicroBitPin.h On 23 Sep 2016, at 22:32, Kuba Raczkowski <notifications@github.commailto:notifications@github.com> wrote: Hi, I seem not to be able to figure out how to operate the uart on GPIO pins. I've tried implementing a simple echo service (talking to a usb-uart dongle), but for the moment only pin 16 seems to respond (both as TX and RX). Tried pins 15,14,2, but none of them acts as it should. Here's my very complex program :) #include "MicroBit.h" int main(void) {
} — |
Oh crap, how silly of me not to find these mappings. Perhaps that info could be made clear on the DAL documentation? The one Please compare with Arduino/esp8266/mbed pinout images where the pin name On Sat, 24 Sep 2016, 10:36 James Devine, notifications@github.com wrote:
|
It is odd that the mbed diagram and mbed target use the same naming convention, but with different meanings (one is the processor pinout, the other the edge connector)... @kubaraczkowski - I think improving documentation is the way to go here, but I worry a little about making things more confusing by having two diagrams... As you say, perhaps if we have a section explaining the difference, this would be fine. |
Indeed, it's the similarity of naming conventions that's so misleading. Additional documentation describing all the differences would be great - best to be placed at the level of uBit->Overview, and then referenced from io/uart/display pages. The lack of complete schematic does not help here (or am I just unable to find it?), it's not easy to trace what is connecting to actual MCU pins. For example, tracing where LED rows go is not easy... |
Its mainly like the difference between BCM and BOARD numbering on the Also I saw someone trip into this recently in the mbed IDE with the SPI. David. On 26 Sep 2016 10:13 am, "Kuba Raczkowski" notifications@github.com wrote:
|
OK - I've added another paragraph of detail into the uBit.io documentation. This should go live with the next release. I think we'll also revisit the mbed target soon too, and I'll see if we can inject some short Px names when we do. |
Hi,
I seem not to be able to figure out how to operate the uart on GPIO pins. I've tried implementing a simple echo service (talking to a usb-uart dongle), but for the moment only pin 16 seems to respond (both as TX and RX). Tried pins 15,14,2, but none of them acts as it should.
I tried first by having the "MicroBit uBit;" instance, then with simpler "MicroBitSerial serial()" component way - but no success. I do often see "clocks" on the non-working pins.
Any clue about that? Are only some GPIO pins able to act as uart pins? If so, which apart from pin 16?
Here's my very complex program :)
The text was updated successfully, but these errors were encountered: