Atmel SAM4S-WPIR-RD .................................................................................................................... User Guide 42060A–ATARM–12/2012 Section 1 1.1 Scope ................................................................................................................................. 1-1 1.2 References and Applicable Documents ............................................................................. 1-2 Section 2 2.1 Deliverables ....................................................................................................................... 2-3 2.2 Board Specifications .......................................................................................................... 2-3 2.3 Electrostatic Warning ......................................................................................................... 2-4 Section 3 3.1 Power Up the Board........................................................................................................... 3-5 3.2 Sample Code and Technical Support ................................................................................ 3-5 Section 4 4.1 Introduction ........................................................................................................................ 4-6 4.2 Function Blocks.................................................................................................................. 4-6 4.2.1 Processor............................................................................................................. 4-6 4.2.2 Clock Circuitry...................................................................................................... 4-7 4.2.3 Reset Circuitry ..................................................................................................... 4-7 4.2.4 Push Button Switches .......................................................................................... 4-7 4.2.5 Power Supplies .................................................................................................... 4-7 4.2.6 Memory ................................................................................................................ 4-8 4.2.7 JTAG/ICE............................................................................................................. 4-9 4.2.8 Image Sensor ...................................................................................................... 4-9 4.2.9 PIR sensor ........................................................................................................... 4-9 4.2.10 ZigBee ............................................................................................................... 4-11 4.2.11 LED Indicators ................................................................................................... 4-11 4.2.12 LCD.................................................................................................................... 4-11 4.2.13 Backlight Control................................................................................................ 4-12 4.3 4.4 Connectors....................................................................................................................... 4-13 4.3.1 JTAG/ICE Connector ......................................................................................... 4-13 4.3.2 USB Micro AB .................................................................................................... 4-14 4.3.3 ZigBee Socket J5............................................................................................... 4-15 4.3.4 LCD/TSC Socket J4........................................................................................... 4-15 Schematics....................................................................................................................... 4-17 Section 5 5.1 Revision History ............................................................................................................... 5-20 SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 i Section 1 Introduction 1.1 Scope The SAM4S-WPIR-RD Reference Design Kit is based on SAM4S16C device. It introduces the application of Passive InfraRed Motion Detector Camera. This User Guide gives design details on the Reference Design Kit and is made up of 4 sections: Section 1 includes a photo of the board, references and applicable documents. Section 2 describes the contents and the main features of the Reference Design Kit. Section 3 provides instructions to power up the board and describes how to use it. Section 4 describes the hardware resources, function blocks, connectors and schematics. Figure 1-1. Board Photo SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 1 1.2 References and Applicable Documents Table 1-1. References and Applicable Documents Title SAM4S datasheet Comment http://www.atmel.com/products/microcontrollers/arm/sam4s.aspx?tab=documents SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 2 Section 2 Kit Contents 2.1 Deliverables The Atmel® SAM4S-WPIR-RD Reference Design Kit includes: Board – One SAM4S-WPIR-RD board Power supply – USB supply Cables – One USB cable, type A to type Micro-B Unpack and inspect the kit carefully. Contact your local Atmel distributor, should there be issues concerning the contents of the kit. 2.2 Board Specifications Table 2-1. SAM4S-WPIR-RD Board Specifications Characteristics Specifications Clock speed 48 MHz MCK Ports USB, JTAG Board supply voltage 5V DC from USB or 3 x AAA Alkaline cells Temperature - operating - storage -10° to +50° C -40° to +85° C Relative humidity 0 to 90% (non condensing) Dimensions 136 mm x 90mm RoHS status Compliant SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 3 2.3 Electrostatic Warning The SAM4S-WPIR-RD board is shipped in a protective anti-static package. The board system must not be subjected to high electrostatic potentials. A grounding strap or similar ESD protective device should be worn when handling the board in hostile ESD environments (offices with synthetic carpet, for example). Avoid touching the component pins or any other metallic element on the board. SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 4 Section 3 Power Up 3.1 Power Up the Board Unpack the board taking care to avoid electrostatic discharge. Connect the board to PC with the USB cable, or insert 3 x AAA Alkaline cells on U4 Battery Holder, and then the board should be powered on. Note: 3.2 Jumpers JP1, JP4, JP7, JP8, JP9, JP10 must be closed and JP2, JP3 must be open for start-up. Sample Code and Technical Support Users can download sample code and get technical support from the Atmel web site: http://www.atmel.com/products/microcontrollers/arm/sam4s.aspx?tab=tools Figure 3-1. Atmel Web Site for SAM4S Products SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 5 Section 4 Hardware 4.1 Introduction The SAM4S-WPIR-RD block diagram includes battery holder, LDO, image sensor, 1M byte SRAM, PIR sensor, JTAG connector, LCD, ZigBee connector, as shown in Figure 4-1. Figure 4-1. SAM4S-WPIR-RD Block Diagram 4.2 Function Blocks 4.2.1 Processor The board is equipped with a SAM4S16 device in a LQFP100 package. SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 6 4.2.2 Clock Circuitry The board includes 2 clock sources: One 12 MHz Crystal for Internal Clock (Y2) One 32.768 kHz Crystal for RTC Clock (Y1) 4.2.3 Reset Circuitry The reset sources for the board are: Power on reset JTAG reset from an in-circuit emulator (JTAG interface is equipped on the board) 4.2.4 Push Button Switches 4.2.5 User interface (BP1) Power Supplies The Board is driven by 5V input power rail from USB cable or 3 x AAA battery. The Board embeds all the necessary power rails required for the microcontroller Table 4-1 summarizes the power specifications. Table 4-1. Power Rails Associated with the Systems Nominal Name Powers Component 3.0V VDDIO Partial Peripheral I/O lines on board 3.0V +3V_PERIPH SRAM and image sensor on board 3.0V +3V_LCD LCD and backlight driver on board 1.2V VDDPLL the PLL cell From SAM4S internal LDO 1.2V VDDCORE the core, including the processor, the embedded memories and the peripherals From SAM4S internal LDO 3.0V ADVREF analog on board SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 7 Power Supply Figure 4-2. J1 USB Micro B 4 3 2 FGND 1 RV1 5V D- D+ ID 7 6 G VIN_SYSTEM 1 C59 1uF 5 8 9 R43 100K V5.5MLA0603 R2 68K C3 10pF RV2 V5.5MLA0603 R3 R4 27R 27R 3 IN OUT JP10 +3V_LCD 5 C60 1uF GND1 EN 4 GND2 TPS78230DDCR C70 100nF DGND DGND DGND FGND VIN_SYSTEM L6 220ohm at 100MHz 1 2 C6 33 uF 16V C51 100nF DGND PB1 1 47K VBU S R1 PB1 0 PC17 2 U6 D3 JP8 1 C29 1uF VIN_SYSTEM R41 100K NSR0320MW2T1G 2 3 C58 U5 IN OUT +3V 5 C57 1uF GND1 EN GND2 4 JP7 +3V_MCU JP9 +3V_PERIPH TPS78230DDCR 100nF D4 DGND VBAT DGND NSR0320MW2T1G DGND U4 VCC GND 1 2 JY-3AAA 3 cell AAA battery holder DGND 4.2.6 Memory The SAM4S features an External Bus Interface (EBI) that permits interfacing to a broad range of external memories and virtually to any parallel peripheral. The SAM4S-WPIR-RD board is equipped with a memory device connected to the SAM4 EBI: One SRAM IS62WV10248DBLL Memory MN3 R46 0R PC8 PC8 DGND +3V_SRAM R21 470K NCS0 PC14 NRD NWE PC11 PC8 R22 47K 5 4 3 2 1 44 43 42 39 28 27 26 25 24 23 22 21 20 19 18 6 40 41 17 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 CS1# CS2 OE# WE# D0 D1 D2 D3 D4 D5 D6 D7 NC1 NC2 NC3 NC4 NC5 NC6 NC7 NC8 VDD1 VDD2 GND1 GND2 IS62WV10248DBLL 9 10 13 14 31 32 35 36 7 8 15 16 29 30 37 38 11 33 12 34 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 +3V_PERIPH R20 DNP R25 DNP 2 PC8_WE PC18 PC19 PC20 PC21 PC22 PC23 PC24 PC25 PC26 PC27 PC28 PC29 PC30 PC31 PA18 PA19 PA20 PA0 PA1 PC16 1 PC9 DGND +3V_SRAM 3 Figure 4-3. C 28 33pF C26 100nF Q2 IRLML6401 C27 1uF DGND SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 8 4.2.7 JTAG/ICE Software debug is accessed by a standard 20-pin JTAG connection. This allows connection to a standard USB-toJTAG in-circuit emulator such as SAM-ICE™. Figure 4-4. JTAG Interface +3V_MCU R6 J2 2 4 6 8 10 12 14 16 18 20 1 100K 3 5 7 9 11 13 15 17 19 R7 R8 R9 R10 100K 100K 100K 100K TDI TMS TCK TDO NRST HTST-110-01-SM-DV DGND 4.2.8 Image Sensor The CMOS image sensor, OV7740 from OmniVision, used in this reference design is a low-complexity, low-cost, low-power, yet powerful sensor. It supports VGA (640x480) at up to 60 fps and QVGA (320x240) at up to 120 fps. The OV7740 has standard interface output pins such as data, horizontal/vertical synchronization signals, pixel clock output and main clock input. Interfacing between the CMOS image sensor and the SAM4S device is made easy by means of the sensor interface (parallel capture mode). The SAM4S is able to sample data from the CMOS image sensor without CPU intervention and transfer image data into internal or external memory. Figure 4-5. Image Sensor +3V_OVT +3V_PERIPH PWDN_OVT R63 100K MN7 OV7740 PB13 PB13 DGND R64 PC15 D5 A4 100K B5 C4 C5 PA4 PA3 PA21 PA23 PA16 PA15 PA21 PA23 PA16 PA15 R5 PA24 PA25 PA26 PA27 PA28 PA29 PA30 PA31 27R C2 E6 C3 D1 E5 E2 D4 D3 F5 F2 E4 E3 D2 E1 R32 DNP XVCLK1 PWDN RESETB SIOC SIOD FSIN PCLK HREF VSYNC DATA0 DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 DATA9 DVDD DGND DOVDD DOVDD DOGND AVDD AVDD AGND AGND VREFH VREFN NC1 NC2 F4 F3 C34 100n F C56 DNP 100nF +3V_OVT DGND L1 C37 1uF C35 1uF PWDN_OVT L2 C41 1uF C42 100n F 0R Q3 <REF> 0R C36 100n F DGND C40 1uF PC10 R13 A1 A6 B1 B6 1 0R C1 C6 D6 R28 100K 2 R30 4.7K 3 R29 4.7K R15 DNP 0R 4.7uH A3 B2 A2 A5 C46 1uF C47 1uF C48 1uF AGND_OVT R45 0R IMAGE SENSOR 4.2.9 DGND PIR sensor The PIR sensor (RE200B from Nicera) chosen for the reference design is a general purpose dual element. This model satisfies user's cost reduction needs, keeping most dual element type performances at reasonable levels. SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 9 PIR Sensor Figure 4-6. ADVREF 2 C33 100nF R31 1M MN8 LT1495CS8 IN1- R33 1M OUT1 3 R35 1M C39 10uF AGND C45 100nF R39 10K C49 10uF C50 10uF PA17 AD0, ADC single end input IN1+ R34 10K ADVREF R36 10K 1 VCC 7 R40 10K 5 BN03K314S300R OUT2 C44 100nF R37 1M 6 GND 4 R38 0R IN2IN2+ ADVREF B1 8 AGND DGND U1 D S G RE200B AGND 1 AGND 2 3 R42 47K AGND SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 10 4.2.10 ZigBee The board has a 10-pin male connector for the Atmel RZ600 ZigBee module. ZigBee Interface Figure 4-7. ZB_RSTN ZB_IRQ SPIO_NPCS1# MISO PA5 PB2 PB14 PA12 1 3 5 7 9 J5 2X10PTS COUDE 2 4 6 8 10 PB3 PA6 PA13 PA14 C61 18pF C62 2.2nF MISC SLP_TR MOSI SPCK +3V_PERIPH C63 2.2uF DGND 4.2.11 LED Indicators The board has one LED indicator for purposes shown below: Table 4-2. LED Indicators 4.2.12 Reference Color Function D1 Blue PIR indicator LCD The LCD module gets reset from the NRST signal. As explained, this NRST is shared with the JTAG port. The LCD chip select signal is connected to NCS2. The SAM4S communicates with the LCD through PIOC where an 8-bit parallel “8080-like” protocol data bus has to be implemented by software. SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 11 Figure 4-8. LCD Block 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 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 +3V_LCD + C52 10uF C53 100nF C54 100nF R44 47K +3V_LCD DGND R54 10K PC11 PC8 PC19 NCS2PA22 NRST LED_A R57 4.7K R56 0R LED_K1 LED_K2 LED_K3 LED_K4 DGND DGND 4.2.13 J4 FH26-39S-0.3SHW VDD DB17 DB16 DB15 DB14 DB13 DB12 DB11 DB10 DB9 DB8 DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 VDD RD WR RS CS RESET IM0 IM1 GND LED-A LEDK1 LEDK2 LEDK3 LEDK4 Y+ YX+ XNC GND U7 LCD YXT28MP002A-39A LCD Backlight Control The LCD backlight is made of four integrated white chip-LEDs arranged in parallel. These are driven by an AAT3155 charge pump, MN10.The AAT3155 is controlled by the SAM4S through a single PIO line PC13 interface; the 0 Ohm resistor R59 is mounted in series on this line, which permits to use it for other custom purposes. In that case, the pull-up resistor R58 maintains the charge pump permanently enabled by default. SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 12 Figure 4-9. Backlight Control MN10 +3V_LCD 10 C64 1uF R58 47K R59 0R PC13 +3V_LCD 9 11 5 B2 BN03K314S300R C67 4.7uF 4 C1+ C1EN/SET 7 C2+ 6 C2OUTCP IN GND AAT3155ITP D1 D2 D3 D4 C65 1uF 8 LED_A 3 2 1 12 LED_K1 LED_K2 LED_K3 LED_K4 C66 1uF DGND DGND 4.3 Connectors 4.3.1 JTAG/ICE Connector Figure 4-10. JTAG J2 Table 4-3. JTAG/ICE Connector J2 Signal Descriptions Pin Mnemonic Description 1 VTref. 3.3V power This is the target reference voltage. It is used to check if the target has power, to create the logic-level reference for the input comparators, and to control the output logic levels to the target. It is normally fed from VDD on the target board and must not have a series resistor. 2 Vsupply. 3.3V power This pin is not connected in SAM-ICE. It is reserved for compatibility with other equipment. Connect to VDD or leave open in target system. 3 nTRST TARGET RESET - Active-low output signal that resets the target JTAG Reset. Output from SAM-ICE to the Reset signal on the target JTAG port. Typically connected to nTRST on the target CPU. This pin is normally pulled HIGH on the target to avoid unintentional resets when there is no connection. 4 GND Common ground 5 TDI TEST DATA INPUT - Serial data output line, sampled on the rising edge of the TCK signal. JTAG data input of target CPU. It is recommended that this pin is pulled to a defined state on the target board. Typically connected to TDI on target CPU. 6 GND Common ground 7 TMS TEST MODE SELECT JTAG mode set input of target CPU. This pin should be pulled up on the target. Typically connected to TMS on target CPU. Output signal that sequences the target's JTAG state machine, sampled on the rising edge of the TCK signal. 8 GND Common ground 9 TCK TEST CLOCK - Output timing signal, for synchronizing test logic and control register access. JTAG clock signal to target CPU. It is recommended that this pin is pulled to a defined state on the target board. Typically connected to TCK on target CPU. SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 13 Pin Mnemonic Description 10 GND Common ground 11 RTCK - Input Return test clock signal from the target. Some targets must synchronize the JTAG inputs to internal clocks. To assist in meeting this requirement, a returned and retimed TCK can be used to dynamically control the TCK rate. SAM-ICE supports adaptive clocking which waits for TCK changes to be echoed correctly before making further changes. Connect to RTCK if available, otherwise to GND. 12 GND Common ground 13 TDO JTAG TEST DATA OUTPUT - Serial data input from the target. JTAG data output from target CPU. Typically connected to TDO on target CPU. 14 GND Common ground 15 nSRST RESET Active-low reset signal. Target CPU reset signal. 16 GND Common ground 17 RFU This pin is not connected in SAM-ICE. 18 GND Common ground 19 RFU This pin is not connected in SAM-ICE. 20 GND Common ground 4.3.2 USB Micro AB Figure 4-11. USB Device Micro-B Connector J1 Table 4-4. USB Device Micro-B Connector J1 Signal Descriptions Pin Mnemonic Description 1 Vbus 5v power 2 DM Data minus 3 DP Data plus 4 ID Not used 5 GND Common ground SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 14 4.3.3 ZigBee Socket J5 ZigBee Socket J5 Figure 4-12. Table 4-5. ZigBee Socket J5 Signal Descriptions 4.3.4 Function Signal Name Signal Name Function Reset 2 Misc. Interrupt Request 3 4 SLP_TR SLP_TR /SEL 5 6 MOSI SPI MOSI SPI MISO MISO 7 8 SCLK SPI CLK Power Supply GND 9 10 VCC VCC Port Pin Pin /RST 1 Interrupt Request IRQ1 SPI chip select GND Port VCC LCD/TSC Socket J4 LCD/TSC Socket J4 Figure 4-13. Table 4-6. LCD/TSC Socket J4 Signal Descriptions Mnemonic Pin Num Pin Num Mnemonic VDD 3V_INTER 1 2 PC7 LCDDAT17 LCDDAT16 PC6 3 4 PC5 LCDDAT15 LCDDAT14 PC4 5 6 PC3 LCDDAT13 LCDDAT12 PC2 7 8 PC1 LCDDAT11 LCDDAT10 PC0 9 10 NC LCDDAT09 LCDDAT08 NC 11 12 NC LCDDAT07 LCDDAT06 NC 13 14 NC LCDDAT05 LCDDAT04 NC 15 16 NC LCDDAT03 LCDDAT02 NC 17 18 NC LCDDAT01 LCDDAT00 NC 19 20 3V VDD SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 15 Mnemonic Pin Num Pin Num Mnemonic RD PC11 21 22 PC8 WR RS PC19 23 24 PA22 CS RESET NRST 25 26 PULL UP IM0 IM1 PULL DOWN 27 28 GND GND LED-A LED-A 29 30 LED-K1 LED-K1 LED-K2 LED-K2 31 32 LED-K3 LED-K3 LED-K4 LED-K4 33 34 NC Y UP Y DOWN NC 35 36 NC X RIGHT X LEFT NC 37 38 NC NC GND GND 39 SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 16 Schematics 4.4 D C B A 5 5 4 PIR Sensor 3 SAM4S-WPIR-RD Block Diagram SMC 8-bit ATMEL Cortex M4 Processor SAM4S (LQFP100) ADC PIODC 2 SRAM LCD USB Battery PIOC USB_CNX EBI_A19 USAGE 2 ZigBEE PC16 Image Sensor TWI SPI PC17 I/O MUXING PIOB EBI_D1 EBI_D0 USAGE USAGE PC0 PIOC PIOA PC1 USAGE USAGE ACC High Threshold ACC Low Threshold PIOA PB0 EBI_A2 PB1 EBI_A3 PIR_IN_INUT EBI_A4 PIODC_EN2 EBI_A5 PA16 PC21 EBI_A6 PA17 PC22 EBI_A7 EBI_A17 PC23 EBI_A8 EBI_A18 EBI_D5 PC24 EBI_A9 PA0 PC4 EBI_D6 PC25 EBI_A10 PA1 PC5 EBI_D7 PC26 EBI_A11 EBI_A0 EBI_A1 PC6 SW_SRAM SMC_NWE PC27 PC18 PC7 PC28 EBI_D2 ICE_TDO PC8 SW_OVT PC29 PC2 ICE_TMS PC9 SMC_NRD ZB_IRQ ICE_TCK USER_LED PB2 PB5 XOUT PC10 LCD_BL EBI_A14 PB6 XIN PC11 PA18 PB7 PC12 USER_PB PIODC_FSIN PB8 USB_DDM PC13 PA2 NCS2_LCD PB9 USB_DDP PC19 PIODC_PCLK PB10 ERASE PIODC_PCK0 EBI_D3 PA21 PIODC_D0 PB11 EBI_A12 EBI_D4 PA22 PIODC_D1 PB12 EBI_A13 PC3 PA23 PIODC_D2 PB13 PC30 ZB_MISC ZB_RST PA24 PIODC_D3 PC31 PB3 ZB_SLPTR PA25 PIODC_D4 OVT_RST NCS0_SRAM PB4 XIN32 PA26 PIODC_D5 PC14 EBI_A15 PA5 XOUT32 PA27 PC15 EBI_A16 PA6 UART_RXD0 PA28 SPI_NPCS1 PA19 PA7 UART_TXD0 PA29 PB14 PA20 PA8 Additional CON PIODC_D6 TWI_D0 PA9 SPI_MISO PIODC_D7 TWI_CK0 PA10 SPI_MOSI PA30 PA3 PA11 PA31 PA4 PA12 SPI_SPCK PC20 PA13 PIODC_EN1 ICE_TDI PA14 3 PA15 4 SAM4S-WPIR-RD Block Diagram A REV INIT EDIT MODIF. SCALE 1/1 1 DES. YDL 1 DATE 22-FEB-12 This agreement is our property. Reproduction and publication without our written authorization shall expose offender to legal proceedings. DATE XXX XX-XXX-XX 3 VER. 1 SHEET A REV. D C B A 42060A–ATARM–12/2012 17 SAM4S-WPIR-RD [USER GUIDE] VIN_SYSTEM 5 TP1 TP2 C1 15pF C2 15pF 15pF DGND C4 15pF 0R R11 XIN32 XIN TEST 4 +1V2 PB12_PWML1_ERASE PB0_PWMH0_AD12B4 PB1_PWMH1_AD12B5 NRST PB4_TWD1_PWMH2_TDI PB6_TMS_SWDIO PB7_TCK_SWCLK PB5_TWCK1_PWML0_TDO JTAGSEL PB11_DDP PB10_DDM PB3_UTXD1_PCK2_AD12B7 PB2_URXD1_NPCS2_AD12B6 PB8_XOUT PB9_XIN MN1 AT91SAM4S-LQFP100 97 96 88 XOUT 7 PB10 89 9 PB11 77 51 79 83 76 60 3 5 ERASE 87 61 +3V_MCU + +3V_MCU VDDCORE JP7 +3V_PERIPH JP4 JP9 +1V2 DGND Y2 12M XOUT32 Y1 32.768 kHz PB2 PB3 TDI TMS TCK TDO PB0 PB1 C57 1uF +3V DGND +3V_MCU JP3 C5 DGND {3} R10 {3} 100K R9 R7 R8 100K 100K 100K JP2 {3} {3} DGND 4 5 +3V_LCD OUT DGND Blue-led NRST IN U5 GND2 GND1 EN DGND {3} PC19 DGND 1 2 OUT GND2 DGND 5 4 TPS78230DDCR EN GND1 IN U6 AT91SAM4S-LQFP100 VIN_SYSTEM C59 1uF 3 3 PA0_PWMH0_TIOA0_A17 PA1_PWMH1_TIOB0_A18 PA2_PWMH2_SCK0_DATRG PA3_TWD0_NPCS3 PA4_TWCK0_TCLK0 PA5_RXD0_NPCS3 PA6_TXD0_PCKO PA7_RTS0_PWMH3 PA8_CTS0_AD12BTRG PA9_URXD0_NPCS1 PA10_UTXD0_NPCS2 PA11_NPCS0_PWMH0 PA12_MISO_PWMH1 PA13_MOSI_PWMH2 PA14_SPCK_PWMH3 PA15_TF_TIOA1_PWML3 PA16_TK_TIOB1_PWML2 PA17_TD_PCK1_PWMH3_AD12B0 PA18_RD_PCK2_A14_AD12B1 PA19_RK_PWML0_A15_AD12B2 PA20_RF_PWML1_A16_AD12B3 PA21_RXD1_PCK1_AD12B8 PA22_TXD1_NPCS3_NCS2_AD12B9 PA23_SCK1_PWMH0_A19 PA24_RTS1_PWMH1_A20 PA25_CTS1_PWMH2_A23 PA26_DCD1_TIOA2_MCDA2 PA27_DTR1_TIOB2_MCDA3 PA28_DSR1_TCLK1_MCCDA PA29_RI1_TCLK2_MCCK PA30_PWML2_NPCS2_MCDA0 PA31_NPCS1_PCK2_MCDA1 ADVREF PB13_PWML2_PCK0_DACO0 +3V_LCD DGND JP10 74 72 67 66 55 53 52 49 48 46 44 42 41 33 31 30 28 12 14 18 24 15 20 22 34 38 39 57 59 63 64 81 1 99 93 XIN32 XOUT32 ADVREF PC11 PC8 PC14 R46 0R R27 27R NCS0 PC8_WE NRD NWE +3V_MCU PB14_NPCS1_PWMH3_DACO1 C60 1uF DGND PA0 PA1 PA2 PA9 PA10 PA14 PA15 PA16 2 PC17 PA3 PA4 PA5 PA6 {3} {3} URXD0 {3} UTXD0 PB13 {3} PA18 PA19 PA20 PB14 PC8 R22 47K +3V_SRAM R21 470K DGND 2 47K FGND R1 68K {3} {3} {3} {3} {3} {3} {3} R2 {3} {3} {3} {3} PA11 PA12 PA13 PA14 PA15 PA16 PA17 {3} {3} {3} {3} {3} {3} {3} {3} {3} {3} {3} 6 40 41 17 5 4 3 2 1 44 43 42 39 28 27 26 25 24 23 22 21 20 19 18 RV1 8 9 D- D+ ID G 27R R4 5V J1 USB Micro B R3 27R 1 2 7 6 JP8 1 DATE DATE 3 VER. XXX XX-XXX-XX PC9 R20 100K VIN_SYSTEM 22-FEB-12 2 SHEET A REV. D C B A 42060A–ATARM–12/2012 18 SAM4S-WPIR-RD [USER GUIDE] 1 2 1 FGND RV2 V5.5MLA0603 D3 D4 NSR0320MW2T1G L6 220ohm at 100MHz C6 33 uF 16V VBAT GND VCC NSR0320MW2T1G U4 JY-3AAA DGND C27 1uF DES. YDL Q2 <REF> +3V_PERIPH PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 3 cell AAA battery holder R25 0R DNP INIT EDIT MODIF. DGND C26 100nF +3V_SRAM DGND A REV 1/1 SCALE 1 This agreement is our property. Reproduction and publication without our written authorization shall expose offender to legal proceedings. Microcontroller SAM4S-WPIR-RD 12 34 11 33 7 8 15 16 29 30 37 38 9 10 13 14 31 32 35 36 +3V_MCU D0 D1 D2 D3 D4 D5 D6 D7 NC1 NC2 NC3 NC4 NC5 NC6 NC7 NC8 VDD1 VDD2 GND1 GND2 DGND 5 DGND V5.5MLA0603 C3 10pF DGND C51 100nF JP1 4 IS62WV10248DBLL CS1# CS2 OE# WE# A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 MN3 C8 100nF ADVREF PA21 PA22 PA23 PA24 PA25 PA26 PA27 PA28 PA29 PA30 PA31 {3} DGND PC18 PC19 PC20 PC21 PC22 PC23 PC24 PC25 PC26 PC27 PC28 PC29 PC30 PC31 PA18 PA19 PA20 PA0 PA1 PC16 PC8 3 PB11 2 VBUS 1 PB10 +3V TP3 TP5 TP4 TP6 +3V_MCU R6 100K {3} D1 1 2 1 2 3 C70 R43 100K 100nF C17 100nF +3V_MCU DGND J2 1 3 5 7 9 11 13 15 17 19 BP1 HTST-110-01-SM-DV R14 220R 3 4 C29 1uF C13 2.2uF D 2 4 6 8 10 12 14 16 18 20 DGND PC12 PA2 VIN_SYSTEM R41 100K TPS78230DDCR DGND C24 4.7uF {3} DGND 3 2 3 VDDIO 98 C23 100nF VDDIO 91 C22 100nF VDDIO 69 C21 100nF GND 2 GND 95 GND 70 GND 45 GND 26 VDDPLL 100 C18 100nF VDDIO 50 C20 100nF {3} {3} PC13 VDDCORE 85 C16 100nF VDDCORE 56 C15 100nF VDDCORE 36 C10 100nF VDDCORE 16 C14 100nF VDDIO 27 C19 100nF {3} PC15 PC16 PC17 PC18 PC19 PC20 PC21 PC22 PC23 PC24 PC25 PC26 PC27 PC28 PC29 PC30 PC31 PC10 PC11 PC14 {3} {3} {3} {3} {3} {3} {3} {3} PC11 PC12 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8_WE PC9 25 47 43 40 37 35 32 29 58 62 65 68 23 21 71 19 73 75 78 80 82 84 86 90 92 94 13 17 54 4 6 8 PC0_D0_PWML0 PC1_D1_PWML1 PC2_D2_PWML2 PC3_D3_PWML3 PC4_D4_NPCS1 PC5_D5 PC6_D6 PC7_D7 PC8_NWR0_NWE PC9_NANDOE PC10_NANDWE PC11_NRD PC12_NCS3_AD12B12 PC13_NWAIT_PWML0_AD12B10 PC14_NCS0 PC15_NCS1PWML1_AD12B11 PC16_A21_NANDALE PC17_A22_NANDCLE PC18_A0_NBS0_PWMH0 PC19_A1_PWMH1 PC20_A2_PWMH2 PC21_A3_PWMH3 PC22_A4_PWML3 PC23_A5_TIOA3 PC24_A6_TIOB3 PC25_A7_TCLK3 PC26_A8_TIOA4 PC27_A9_TIOB4 PC28_A10_TCLK4 PC29_A11_TIOA5_AD12B13 PC30_A12_TIOB5_AD12B14 PC31_A13_TCLK5_AD12B15 VDDOUT 11 C12 100nF VDDIN 10 C11 100nF 4 C25 4.7uF C B A C58 100nF DGND 5 33pF C28 C9 10uF 1 2 D C B A PC15 PB13 FSIN HREF VSYNC PA23 PA21 PA16 PA15 PB13 {2} {2} {2} {2} PA4 PA3 {2} {2} {2} {2} XVCLK1 PCLK {2} {2} {2} {2} {2} {2} {2} {2} +3V_LCD R54 {2} 10K {2} {2} {2} {2} R57 4.7K DGND 5 R29 4.7K PA21 PA23 PA16 PA15 TP8 SMD TP9 SMD TP10 SMD TP11 SMD TP12 SMD +3V_OVT R63 100K R5 0R PB13 R64 SIOC SIOD FSIN PCLK HREF VSYNC VDD DB17 DB16 DB15 DB14 DB13 DB12 DB11 DB10 DB9 DB8 DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 VDD RD WR RS CS RESET IM0 IM1 GND LED-A LEDK1 LEDK2 LEDK3 LEDK4 Y+ YX+ XNC GND 4 DVDD DGND DOVDD DOVDD DOGND AVDD AVDD AGND AGND NC1 NC2 VREFH VREFN {2} J4 FH26-39S-0.3SHW DATA0 DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 DATA9 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 LCD 4 F4 F3 C1 C6 D6 B1 B6 A1 A6 A3 B2 A2 A5 IMAGE SENSOR XVCLK1 PWDN RESETB MN7 OV7740 PWDN_OVT C4 C5 C2 E6 C3 D1 E5 E2 D4 D3 F5 F2 E4 E3 D2 E1 DGND R44 47K D5 A4 100K B5 27R LED_K1 LED_K2 LED_K3 LED_K4 C54 100nF PA24 PA25 PA26 PA27 PA28 PA29 PA30 PA31 DGND PA21 PA23 PA16 PA15 R30 4.7K {2} {2} {2} {2} {2} {2} {2} {2} +3V_LCD C53 100nF R56 DGND + C52 10uF PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 PC11 PC8 PC19 NCS2 PA22 NRST LED_A U7 LCD YXT28MP002A-39A 5 PC13 C34 100nF C37 1uF C40 1uF C46 1uF C56 DNP 100nF C35 1uF C41 1uF C47 1uF PA5 PB2 PB14 PA12 L1 0R +3V_OVT C64 1uF 10 9 11 5 4 R32 DNP 0R R28 100K R13 7 0R S D G 2 1 3 LED_A C65 1uF 8 LED_K1 LED_K2 LED_K3 LED_K4 6 3 2 1 12 C62 2.2nF PB3 PA6 PA13 PA14 MISC SLP_TR MOSI SPCK C63 2.2uF {2} {2} {2} {2} DGND PC10 R42 47K AGND {2} ADVREF R36 10K C49 10uF AGND ADVREF R33 1M R35 1M AGND R39 10K C50 10uF 2 PA9 AGND {2} PA3 C45 100nF R40 R34 10K C39 10uF R37 1M 2 3 7 6 10K 5 DGND PIR SENSOR (URXD0) {2} PA11 C66 1uF DGND (TWD0) {2} +3V_PERIPH 2 R31 C33 1M 100nF OUT1 VCC GND ADVREF 1 8 4 R60 649K 1% R61 200K 1% 2 5 3 1 7 5 3 1 R62 649K 1% 4 7 DGND 6 8 PIN Connector 8 J6 MN8 LT1495CS8 IN1- IN1+ OUT2 IN2IN2+ 2 4 6 8 1 PA17 TP7 SMD {2} {2} +3V_PERIPH (TWCK0) (UTXD0) DGND ADVREF AD0, ADC single end input B1 {2} R38 0R BN03K314S300R C44 100nF AGND PB0 {2} AD4, Comparator plus PB1 {2} AD5, Comparator minus PA10 {2} DATE 22-FEB-12 PA4 DES. YDL PB3 INIT EDIT MODIF. 1/1 SCALE REV A Additional Connector SAM4S-WPIR-RD Peripherals 1 This agreement is our property. Reproduction and publication without our written authorization shall expose offender to legal proceedings. DATE XXX XX-XXX-XX 3 VER. 3 SHEET A REV. D C B A 42060A–ATARM–12/2012 19 SAM4S-WPIR-RD [USER GUIDE] 3 D1 D2 D3 D4 OUTCP C2- C2+ RE200B U1 R15 DNP 0R PWDN_OVT Q3 <REF> 1 +3V_PERIPH MN10 C1+ C1EN/SET IN AAT3155ITP GND C61 18pF LCD BACKLIGHT 3 J5 2X10PTS COUDE 2 4 6 8 10 ZIGBEE 1 3 5 7 9 DGND C67 4.7uF DGND 4.7uH R58 47K +3V_LCD R45 0R L2 DGND DGND C36 100nF C42 100nF R59 0R C48 1uF AGND_OVT {2} {2} {2} {2} B2 +3V_LCD BN03K314S300R ZB_RSTN ZB_IRQ SPIO_NPCS1# MISO 2 3 Section 5 Revision History 5.1 Revision History Document Comments 42060A Initial SAM4S-WPIR-RD [USER GUIDE] 42060A–ATARM–12/2012 20 Atmel Corporation 1600 Technology Drive Atmel Asia Limited Unit 01-5 & 16, 19F Atmel Munich GmbH Business Campus Atmel Japan G.K. 16F Shin-Osaki Kangyo Bldg San Jose, CA 95110 BEA Tower, Millennium City 5 Parkring 4 1-6-4 Osaki, Shinagawa-ku USA 418 Kwun Tong Roa D-85748 Garching b. Munich Tokyo 141-0032 Tel: (+1) (408) 441-0311 Kwun Tong, Kowloon GERMANY JAPAN Fax: (+1) (408) 487-2600 HONG KONG Tel: (+49) 89-31970-0 Tel: (+81) (3) 6417-0300 www.atmel.com Tel: (+852) 2245-6100 Fax: (+49) 89-3194621 Fax: (+81) (3) 6417-0370 Fax: (+852) 2722-1369 © 2012 Atmel Corporation. All rights reserved. / Rev.: 42060A–ATARM–12/2012 Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. ARM®, Thumb®, CortexTM are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.