stm32usart1wire

one-wire over bit banging vs. one wire over usart


I want to use a sensor with one-wire protocol, the matter is which way of using this protocol is optimized and more rational? over usart or using bit banging?

if it is important I'm using am2305 and stm32fxx microcontrollers.


Solution

  • I'm prefer to use USART+DMA with one buffer for transmit and receive. And I think this choice depends on your skill and requierements of your project.

    There many ways to implement one-wire protocol.

    All of them have thier advantages and disadvantages:

    I have different projects where work first and last methods listed above.

    You must know which method is preferred for you and your project.