Using STM32F405RG Man Chester decoding

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
yattr
 
Posts: 13
Joined: Fri Dec 31, 2021 5:54 pm

Using STM32F405RG Man Chester decoding

Post by yattr »

My previous post is locked so posted the results here.

I am using the Feather STM32F405 Express #4382 to successfully decode a 100us Man Chester 13 bit word using MicroPython. Yellow is the mChester signal and Blue is the timing read pulses. This in turn is controlling the speed of an autonomous digital slot car as shown here https://youtu.be/Ay6M8Zl6MT4
Screen Shot 2022-04-22 at 4.26.09 PM.jpg
Screen Shot 2022-04-22 at 4.26.09 PM.jpg (858.1 KiB) Viewed 255 times
Screen Shot 2022-04-22 at 4.26.26 PM.jpg
Screen Shot 2022-04-22 at 4.26.26 PM.jpg (715.38 KiB) Viewed 255 times
The complete code is based on a start sequence interrupt and synchronization followed by polling for the decode which in turn synchronizes the DAC speed values every 75ms.

This is just the code fragment for the synchronization word.

while y == 0:
if D6pinlow.value() == 0:
time.sleep_us(35)
D12pin.high()
bitvalue[y] = D6pinlow.value()
D12pin.low()
y += 1
while y <= (wordlength - 2):
time.sleep_us(70)
D12pin.high()
bitvalue[y] = D6pinlow.value()
D12pin.low()
y += 1

User avatar
tepalia02
 
Posts: 104
Joined: Sun Apr 24, 2022 6:53 am

Re: Using STM32F405RG Man Chester decoding

Post by tepalia02 »

Thanks for sharing with us.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”