ATA5773-DK1 Atmel, ATA5773-DK1 Datasheet - Page 64

no-image

ATA5773-DK1

Manufacturer Part Number
ATA5773-DK1
Description
BOARD XMITTER FOR ATA5773 315MHZ
Manufacturer
Atmel
Type
Transmitterr
Datasheets

Specifications of ATA5773-DK1

Frequency
315MHz
Maximum Frequency
315 MHz
Supply Voltage (max)
4 V
Supply Voltage (min)
2 V
Supply Current
9 mA
Product
RF Development Tools
For Use With/related Products
ATA5773
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
64
Atmel ATA5771/73/74
Figure 4-24. Synchronization when Reading a Software Assigned Pin Value
The following code example shows how to set port A pins 0 and 1 high, 2 and 3 low, and
define the port pins from 4 to 5 as input with a pull-up assigned to port pin 4. 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.
Assembly Code Example
C Code Example
INSTRUCTIONS
unsigned char i;
...
; Define pull-ups and set outputs high
; Define directions for port pins
ldi
ldi
out
out
; Insert nop for synchronization
nop
; Read port pins
in
...
...
/* Define pull-ups and set outputs high */
/* Define directions for port pins */
PORTA = (1<<PA4)|(1<<PA1)|(1<<PA0);
DDRA = (1<<DDA3)|(1<<DDA2)|(1<<DDA1)|(1<<DDA0);
/* Insert nop for synchronization*/
_NOP();
/* Read port pins */
i = PINA;
...
SYSTEM CLK
SYNC LATCH
r16,(1<<PA4)|(1<<PA1)|(1<<PA0)
r17,(1<<DDA3)|(1<<DDA2)|(1<<DDA1)|(1<<DDA0)
PORTA,r16
DDRA,r17
r16,PINA
PINxn
r16
r17
(1)
out PORTx, r16
0x00
nop
t
pd
0xFF
in r17, PINx
9137E–RKE–12/10
0xFF

Related parts for ATA5773-DK1