Pinguino Forum

Full Version: P-micro no digitalWrite pin #13
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This issue was caused by the compiler becoming buggy.
After a reboot, the problem disappeared.

However, I did find the definition for USERBUTTON was
wrong. It is set to 41, it should be 13.
After struggling with IO problems using the Pinguino Micro Pic32, I soldered a LED board to see the I/O ouputs.
I found that the digitalRead( ) & digitalWrite( ) will not send a signal to pin #13. I have no knowledge of the Arduino and what may be necessary to attempt to make the PIC32 compatible but this seems to be a IDE bug since pins 10, 13, 20, and 28 also have multiple definitions.

It seems odd that the only way to write to this pin using digitalRead( ) & digitalWrite( ) is to use the pseudo pin #41 read/write. You can write/read normally using the connector P2_3 read/write.

Perhaps someone can explain the extra pin definitions for pin 13, 20, and 28.

(Now, I am off to decode the port commands. As I decipher this board I will be updating this diagram. )

[Image: pic32_pinguino-micro_io.png]
I see from the schematic that port D bit 4 is tied to port D bit 0, so that is likely the underlying issue.

(It has consequences, such as potentially causing a short.) Maybe the pin was set by the digitalWrite but clashed with the pin it's shorted to? (You can damage the chip that way.)

I don't have that board but you have to be similarly aware on the OTG I have.