STM32 and One-wire protocol with interface hardware

General discussion on mikroC PRO for ARM.
Post Reply
Author
Message
ericenaelectronics
Posts: 2
Joined: 31 Jan 2023 20:06

STM32 and One-wire protocol with interface hardware

#1 Post by ericenaelectronics » 31 Jan 2023 20:50

Hello All,

I'm using STM32F091RC and mikroC PRO for ARM and I need to implement one-wire bidirectional communication between two of my own devices.

I need to use 2 IO lines from the MCU (RxD and TxD) like the following (from here):
Image

Click boards are not an option for me here.

I know of the OneWire Library in mikroC for ARM but it looks unsuitable as it uses 1 pin only (I need the Rx Tx buffer for level shifting) and requires me to disable interrupts.

I already saw the post
viewtopic.php?p=219309#p219309
and it mentions using USART but you have to write your own Library (That's what I'm trying to avoid, lol)

If anyone knows how to solve this with an existing Library I would be greatly appreciative!

User avatar
Tanja_Kovacevic
mikroElektronika team
Posts: 98
Joined: 09 Aug 2021 11:39

Re: STM32 and One-wire protocol with interface hardware

#2 Post by Tanja_Kovacevic » 03 Feb 2023 15:31

Hi Eric,

As I already answered you in the ticket,
this is not the standard one-wire communication.

So there is no other solution than to write your own library.

You can use Necto Studio because SDK 2.0 is open-source,
and it would be much easier for you to adjust the existing library.
On our GitHub you can find the source code:
https://github.com/MikroElektronika/mik ... one_wire.c


Kind regards,
Tanja

Post Reply

Return to “mikroC PRO for ARM General”