Nanoframework ESP32 OneWire Pin - nanoframework

is the one wire bus for ESP32 only available for pin 16 and 17? I am going to rework a project which was first written in Arduino IDE. There it was possible to set the pin for the one wire bus. I want to use nanoframework but my pcb is already there and port 15 and 23 are used for the one wire bus. I really like nanoframework and the sample for DS18B20 does not find any sensor. With Arduino IDE it is working. Is there a way to specifiy the pin for one wire? THX

.NET nanoFramework implements support for 1-Wire protocol using UART, therefore it requires both TX and RX UART pins to work. On the pre-build firmware images it's configured to use pins 16 and 17 as you've mentioned.
You have to connect those together and also add a 4.7k pull up resistor.

Related

STM32 boot loader

I'm learning about embedded systems and have an idea about one small project and I want to use Cortex M0+ based MCU STM32G081KBT6. I saw a lot of tutorials with this MCU type, but all of them are based on developer board and with them it is very simple to upload code with USB cable. I want to make my custom PCB for this. So my question is what I have to do so I can upload my code to this microcontroller?
From a datasheet I think I have to use SWDIO (PA13) and SWCLK(PA14) ports for Boot, but if someone can help me do I have to use also some resistors, can I make it USB to wire transfer with this, or I have to use some external device to make it possible? Or there is some easier and better solution to upload code from my laptop to microcontroller?
Thanks for the replies.
There two main options:
SWD
Implement an SWD programming connector. Basically the pins GND, SWDIO, SWCLK and preferably 3.3V are made available. No resisters are needed. You can fit a 4 pin header, an official 10 pin SWD connector or just 4 pads (for connecting using an adapter with pogo pins).
This option requires an SWD debug adapter like ST-Link or J-Link. In addition to uploading firmware, this option supports debugging.
USART
Make the USART (RX, TX) pins plus GND and 3.3V available on the board. This option requires a USB-to-serial adapter.
It's also possible to use I2C or SPI instead, though there are no standard solutions for connecting to your board that I'm aware of.
USB isn't an option for this particular chip. It is supported on many of the more expensive STM32 chips though.
I strongly recommend the first option. It is far more versatile than the other options. And an ST-Link adapter isn't expensive.
Details regarding the bootloader capabilities and pins:
https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

How can I read SPI (Serial Peripheral Interface) data sent by a microcontroller on Windows

I'm working with an Atmel ATMEGA328P microprocessor that is writing debug information out the MOSI SPI pin. Is there a way to wire a connection to a Windows computer so I can see the debug information?
Ideally, there would be a breakout board or something that can be purchased that would allow me to run wires from the microcontroller's SPI ports to the board and then the board would have a USB connection so I can connect to my computer. I've searched and nothing is coming up, but maybe I'm not using the right terms.
If a connection is possible, any references to code or an existing program for reading this data would really help.
By the way, the USART pins are already being used by the microcontroller for communicating with another device, otherwise I would've used them with a FT232R breakout board.
You need an SPI adapter. SparkFun has a cheap one for sale. If you have an Arduino or another Atmega328 lying around you can set it up as SPI host and use it as a SPI-USB adapter.

Where are pin1.0 and pin1.1 on MSP-EXP430F5529LP launchpad for MSP430?

I am looking at the pin-out here: http://www.ti.com/lit/ml/slau536/slau536.pdf and can't find p1.0 and p1.1. Where are they?
The reason (perhaps, stupid) why I started looking for these two pins is because I need to connect RX and TX of a UART somewhere on the launchpad, and p3.3 and p3.4 did not work, and on some loosely related pinouts of other boards such as this: http://energia.nu/Tutorial_DigitalReadSerial.html p1.1 is RXD and p1.2 is TXD (not sure what's the difference between RX and RXD, assuming for now they are the same). So I thought maybe I try these pins and try my luck there? And now I can't find them.
BTW, the pinout shows that p3.3 and p3.4 are UART RX and TX on BoosterPack standard, which I don't have, and on the launchpad these pins are UCA0RXD and UCA0TXT (also, they are apparently UCA0SOMI and UCA0SIMO). I don't know yet what these abbreviations mean, and also, why there are two sets of functions on the same pins and how to switch between them.
My launchpad (in subj) documentation says it supports up to 4 hardware UARTs. Where? And why then is there a UART on booster pack?
Maybe p1.1 and p1.2 are taken for the launchpad's onboard backchannel UART?
If you want to know where every pin goes on this board then you should look at the schematic in the User's Guide. But more importantly, you should get familiar with the datasheet for the microcontroller on the board.
You don't see P1.0 and P1.1 because those pins are not brought out to the booster pack headers (connectors). Those pins are used within the launchpad board for something else. (They are not even UART pins as you hoped.)
P3.3 and P3.4 is the only UART connection that you have available through the booster pack headers. The other UART is on P4.4 and P4.5 and those pins aren't brought out through the headers. So you should probably try to get P3.3 and P3.4 working. Did you download TI's example software for this launchpad? There is probably an example program that uses the UART.
P3.3 and P3.4 are multiplexed as are many GPIO pins on typical microcontrollers. These particular pins can be configured as GPIO, a UART, or an SPI port. SOMI and SIMO are abbreviations related to the SPI function. Your code will have to configure these pins for the UART function. Read the datasheet and study the example software to learn how to do this.
I'm not sure where you saw four UARTs. The microcontroller on this particular launchpad has four serial interfaces but only two of those interfaces are designed for UARTs. The other two serial interfaces can be SPI or I2C.

Directly Control USB Output?? (any language)

So I know that for a USB port type A there is 2 ouputs/inputs. I'm working on a simple electronic circuit and I would like to ouput datas on to my computer so a program could work with it. How (without it getting too complicated on the circuit side) can I just choose the output of the USB port and read the input just on the on/off level?
Thanks
What you want is the www.Nusbio.net device.
it is an USB device that give any .NET programming languages access to 8 gpios and also SPI and I2c bus.
USB is more complicated than what you are describing. It sounds like what you really want is a serial port, where you can use the TX and RX lines as your output and input to the PC, or manually control the modem control or GPIO pins. You can still do this with USB via a USB to UART Bridge device.
If you are simply looking to toggle an I/O pin, some of these devices also have general purpose I/O pins for this type of thing. You can set it to low/high from the PC if it is set to be an output and read the I/O value if it is an input.
You can talk to it as a serial device from your computer using normal serial communications such as POSIX method for Linux or OSX or the Commuincations API for Windows. In this case you can also set the flow control to manual and use the RTS/CTS pins as GPIOs.
You cannot directly control the USB inputs and outputs like you want to do. However, there are various solutions that involve connecting a USB device to your computer and sending commands to it that use its inputs and outputs. One such solution is called Firmata.

Wireless programming with the Arduino XBee Shield and XBee Explorer

I am trying to enable wireless programming of an Arduino via the XBee Shield and an XBee Explorer. I've seen two tutorials online, XBee radios and Wireless Bootloading for ATmega168/ATmega328 that show you how do it.
However, both tutorials talk about using components to connect the receiver XBee to the Arduino. Well the XBee Shield handles the communication between the receiver XBee and the Arduino, so the extra components aren't necessary (or are they). They talk about using a capacitor or transistor to be able to wirelessly reset the Arduino. Is this already possible with the XBee Shield, or is there some modification I can make to it to make it possible?
How can I use the existing Arduino IDE to program my Arduino wirelessly?
You are correct in the fact that the extra components are needed to reset the Arduino wirelessly and you do need them even if you are using the Xbee shield. I'll assume that one of the tutorials that you were reading was this one. What you are going to want to do is read over the tutorial and build the transistor/capacitor/resistor circuit into a little ball (similar to this) or on a piece of prototyping board with the three signal wires coming out. You need to solder the "Reset signal from XBee" to the D3 pin on the shield which should be labeled (or it can be found on the Datasheet). Then you will have to figure out a way to connect the reset to the reset pin on your Arduino, and the ground to either device (because they should be connected by the shield). This can be as simple as sticking the wire into the sockets on the Arduino. After you do this and setup the environment as per the previously mentioned tutorial, you should be good to go!
If you do have any questions, feel free to ask, I should be able to help.