Encoder Read

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Demos > Standard Peripherals Demos > TIM >

Encoder Read

Previous pageReturn to chapter overviewNext page

Demo File: stm32f4_encoder_demo_target.mdl

encoder_read_target_model

 

Demo File: stm32f4_encoder_demo_host.mdl

encoder_read_host_model

 

Hardware setup

encoder_read_hwsetup

Description

This example demonstrates how to use the Encoder Read Block.

The target model is configured to:

1.Read Encoder Channel A and B using pin A8 and E11 respectively.
2.Output encoder direction and count as binary data packet via UART pin B6.

The host model is configured to read aMG Converter - N (USB-UART converter) channel B and display the received binary data packet as display and plot.

What should be happening?

As a motor turn encoder count and direction is updated and displayed on the host PC.