Motor de Búsqueda de Datasheet de Componentes Electrónicos
  Spanish  ▼
ALLDATASHEET.ES

X  

ATtiny5 Datasheet(PDF) 45 Page - ATMEL Corporation

No. de pieza ATtiny5
Descripción Electrónicos  8-bit Microcontroller with 512/1024 Bytes In-System Programmable Flash
PDF  168 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrónico  ATMEL [ATMEL Corporation]
Página de inicio  http://www.atmel.com
Logo ATMEL - ATMEL Corporation

ATtiny5 Datasheet(HTML) 45 Page - ATMEL Corporation

Back Button ATtiny5 Datasheet HTML 41Page - ATMEL Corporation ATtiny5 Datasheet HTML 42Page - ATMEL Corporation ATtiny5 Datasheet HTML 43Page - ATMEL Corporation ATtiny5 Datasheet HTML 44Page - ATMEL Corporation ATtiny5 Datasheet HTML 45Page - ATMEL Corporation ATtiny5 Datasheet HTML 46Page - ATMEL Corporation ATtiny5 Datasheet HTML 47Page - ATMEL Corporation ATtiny5 Datasheet HTML 48Page - ATMEL Corporation ATtiny5 Datasheet HTML 49Page - ATMEL Corporation Next Button
Zoom Inzoom in Zoom Outzoom out
 45 / 168 page
background image
45
8127C–AVR–10/09
ATtiny4/5/9/10
10.2.7
Program Example
The following code example shows how to set port B pin 0 high, pin 1 low, and define the port
pins from 2 to 3 as input with a pull-up assigned to port pin 2. 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.
Note:
See “Code Examples” on page 5.
10.3 Alternate Port Functions
Most port pins have alternate functions in addition to being general digital I/Os. In Figure 10-6
below is shown how the port pin control signals from the simplified Figure 10-2 on page 41 can
be overridden by alternate functions.
Assembly Code Example
...
; Define pull-ups and set outputs high
; Define directions for port pins
ldi
r16,(1<<PUEB2)
ldi
r17,(1<<PB0)
ldi
r18,(1<<DDB1)|(1<<DDB0)
out
PUEB,r16
out
PORTB,r17
out
DDRB,r18
; Insert nop for synchronization
nop
; Read port pins
in
r16,PINB
...



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Descarga

Go To PDF Page


Enlace URL



¿ALLDATASHEET es útil para Ud.?  [ DONATE ] 

Todo acerca de Alldatasheet   |   Publicidad   |   Contáctenos   |   Política de Privacidad   |   Enlace a la hoja de datos    |   Intercambio de Enlaces   |   Lista de Fabricantes
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com