LM3S1150 Luminary Micro, Inc, LM3S1150 Datasheet - Page 429

no-image

LM3S1150

Manufacturer Part Number
LM3S1150
Description
Lm3s1150 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM3S1150-EQC50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1150-EQC50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1150-IBZ50-A2
Manufacturer:
Texas Instruments
Quantity:
135
Part Number:
LM3S1150-IBZ50-A2
Manufacturer:
TI
Quantity:
142
Part Number:
LM3S1150-IBZ50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1150-IBZ50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1150-IQC50-A2
Manufacturer:
Texas Instruments
Quantity:
135
Part Number:
LM3S1150-IQC50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
17.3
17.4
Table 17-1. QEI Register Map
July 26, 2008
Offset
0x00C
0x000
0x004
0x008
0x010
Name
QEICTL
QEISTAT
QEIPOS
QEIMAXPOS
QEILOAD
which is 0.09% above 2
divide in most cases. If absolute accuracy were required, the controller’s divide instruction could be
used.
The QEI module can produce a controller interrupt on several events: phase error, direction change,
reception of the index pulse, and expiration of the velocity timer. Standard masking, raw interrupt
status, interrupt status, and interrupt clear capabilities are provided.
Initialization and Configuration
The following example shows how to configure the Quadrature Encoder module to read back an
absolute position:
1.
2.
3.
4.
5.
6.
7.
Register Map
Table 17-1 on page 429 lists the QEI registers. The offset listed is a hexadecimal increment to the
register’s address, relative to the module’s base address:
QEI0: 0x4002.C000
Enable the QEI clock by writing a value of 0x0000.0100 to the RCGC1 register in the System
Control module.
Enable the clock to the appropriate GPIO module via the RCGC2 register in the System Control
module.
In the GPIO module, enable the appropriate pins for their alternate function using the
GPIOAFSEL register.
Configure the quadrature encoder to capture edges on both signals and maintain an absolute
position by resetting on index pulses. Using a 1000-line encoder at four edges per line, there
are 4000 pulses per revolution; therefore, set the maximum position to 3999 (0xF9F) since the
count is zero-based.
Enable the quadrature encoder by setting bit 0 of the QEICTL register.
Delay for some time.
Read the encoder position by reading the QEIPOS register value.
Write the QEICTL register with the value of 0x0000.0018.
Write the QEIMAXPOS register with the value of 0x0000.0F9F.
Type
R/W
R/W
R/W
R/W
RO
14
; in this case a shift by 15 would be an adequate approximation of the
0x0000.0000
0x0000.0000
0x0000.0000
0x0000.0000
0x0000.0000
Reset
Preliminary
Description
QEI Control
QEI Status
QEI Position
QEI Maximum Position
QEI Timer Load
LM3S1150 Microcontroller
page
See
431
433
434
435
436
429

Related parts for LM3S1150