attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 68

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
68
ATtiny167
Figure 9-5.
The following code example shows how to set port B pins 0 and 1 high, 2 and 3 low, and define
the port pins from 4 to 7 as input with pull-ups assigned to port pins 6 and 7. The resulting pin
values are read back again, but as previously discussed, a nop instruction is included to be able
to read back the value recently assigned to some of the pins.
INSTRUCTIONS
Synchronization when Reading a Software Assigned Pin Value
SYSTEM CLK
SYNC LATCH
PINxn
r16
r17
out PORTx, r16
0xFF
0x00
nop
t
pd
in r17, PINx
0xFF
7728A–AUTO–07/08

Related parts for attiny167-esxz