Download User Manual - PDF - s3.amazonaws.com
Transcript
www.deccanrobots.com User manual for PCAM Practical Course For ATMEL Microcontrollers Hardware Version EEDT4.0-LF-2.0 www.DeccanRobots.com DeccanRobots 1 www.deccanrobots.com User manual for PCAM Know your Hardware DeccanRobots 2 www.deccanrobots.com User manual for PCAM 89S51/89S52/ATmega8515 Target Section DeccanRobots 3 www.deccanrobots.com User manual for PCAM ATmega16 / ATmega32 / ATmega8535 Target Section JTAG Connector for ATmega32 DeccanRobots 4 www.deccanrobots.com User manual for PCAM ATmega8 Target Section DeccanRobots 5 www.deccanrobots.com User manual for PCAM Provision to add External Crystal for AVR target sections DeccanRobots 6 www.deccanrobots.com User manual for PCAM Dual ISP Programming Header DeccanRobots 7 www.deccanrobots.com User manual for PCAM 5x2 pin ISP Programming Header GND 10 GND 8 6 4 2 GND GND +5V 9 7 5 3 1 MISO SCK Reset MOSI DeccanRobots 8 www.deccanrobots.com User manual for PCAM 6 Pin ISP Programming Header 6 5 4 3 2 1 RST SCK MISO MOSI GND VCC ISP DeccanRobots 9 www.deccanrobots.com User manual for PCAM 7-segment Interfacing Section DeccanRobots 10 www.deccanrobots.com User manual for PCAM Stepper Motor Driver Interfacing Section DeccanRobots 11 www.deccanrobots.com User manual for PCAM 8 Bit Analog to Digital Converter Interfacing Section DeccanRobots 12 www.deccanrobots.com User manual for PCAM RS232 Interfacing Section DeccanRobots 13 www.deccanrobots.com User manual for PCAM LED Interfacing Section DeccanRobots 14 www.deccanrobots.com User manual for PCAM Switch Interfacing Section SW1 to SW4 are pulled up SW5 & SW6 are pulled down Ref Schematics for details DeccanRobots 15 www.deccanrobots.com User manual for PCAM TWI / I2C Interfacing Section RTC using DS1307 EEPROM using 24C256 DeccanRobots 16 www.deccanrobots.com User manual for PCAM DC Motor Driver Interfacing Section DeccanRobots 17 www.deccanrobots.com User manual for PCAM 4x4 Keypad Interfacing Section DeccanRobots 18 www.deccanrobots.com User manual for PCAM 16x2 LCD Interfacing Section DeccanRobots 19 www.deccanrobots.com User manual for PCAM 93C46 SPI EEPROM Interfacing Section DeccanRobots 20 www.deccanrobots.com User manual for PCAM IR, Temperature & Preset Interfacing Section Temperature Sensor& Preset DeccanRobots IR LED, TSOP1738, IR Receiver 21 www.deccanrobots.com User manual for PCAM Power Supply Section Connect 9-12V DC Power here 7805 Voltage Regulator 5V Output point. DeccanRobots Power ON Indicator 22 www.deccanrobots.com User manual for PCAM MOSI MISO SCK RST Schematics – 89S52 Target Section VCC VCC JP2 U1 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 JP1 1 2 3 4 5 6 7 8 C2 Y1 P1.0/T2 P1.1/T2EX P1.2/ECI P1.3/CEX0 P1.4/SS/CEX1 P1.5/MOSI/CEX2 P1.6/MISO/CEX3 P1.7/SCK/CEX4 RESET P3.0/RXD P3.1/TXD P3.2/INT0 P3.3/INT1 P3.4/TO P3.5/T1 P3.6/WR P3.7/RD XTL2 XTL1 VSS 89S51/52 VDD P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3 P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 EN ALE/PROG PSEN P2.7/A15 P2.6/A14 P2.5/A13 P2.4/A12 P2.3/A11 P2.2/A10 P2.1/A9 P2.0/A8 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 JP9 1 2 3 4 5 6 7 8 VCC 1 2 3 4 5 6 7 8 JP8 C1 DeccanRobots 23 www.deccanrobots.com User manual for PCAM MOSI MISO SCK RST Schematics – ATmega32 Target Section VCC ATMEGA_40_PIN JP13 1 2 3 4 5 6 7 8 JP10 1 2 3 JP12 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 (XCK/TO)PB0 (T1)PB1 (INT2/AIN0)PB2 (OC0/AIN1)PB3 (SS)PB4 (MOSI)PB5 (MISO)PB6 (SCK)PB7 RESET U3 VCC GND XTAL2 XTAL1 (RXD)PD0 (TXD)PD1 (INT0)PD2 (INT1)PD3 (OC1B)PD4 (OC1A)PD5 (ICP1)PD6 PA0(ADC0) PA1(ADC1) PA2(ADC2) PA3(ADC3) PA4(ADC4) PA5(ADC5) PA6(ADC6) PA7(ADC7) AREF GND AVCC PC7(TOSC2) PC6(TOSC1) PC5(TDI) PC4(TDO) PC3(TMS) PC2(TCK) PC1(SDA) PC0(SCK) PD7(OC2) JP22 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 1 2 3 4 5 6 7 8 VCC JP21 L1 10uH 1 2 8 7 6 5 4 3 2 1 C3 100nF JP20 TDI TDO TMS TCK 1 2 3 JP11 VCC JP17 TCK TDO TMS TDI 1 3 5 7 9 2 4 6 8 10 VCC RST C4 100nF HEADER 5X2 DeccanRobots 24 www.deccanrobots.com User manual for PCAM Schematics – ATmega8 Target Section RST JP25 VCC 1 2 3 4 5 6 7 8 JP33 U7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 28 (RESET)PC6 PC5(ADC5) 27 (RXD)PD0 PC4(ADC4) 26 (TXD)PD1 PC3(ADC3) 25 (INT0)PD2 PC2(ADC2) 24 (INT1)PD3 PC1(ADC1) 23 (XCK_T0)PD4 PC0(ADC0) 22 VCC GND 21 GND AREF 20 (XTAL1/TOSC1)PB6 AVCC 19 (XTAL2/TOSC2)PB7 PB5(SCK) 18 (T1)PD5 PB4(MISO) 17 (AIN0)PD6 PB3(MOSI) 16 (AIN1)PD7 PCB2(SS/OC1B) 15 (ICP1)PB0 PB1(OC1A) 7 6 5 4 3 2 1 VCC JP32 1 2 L2 10uH C5 JP27 3 2 1 100nF 3 2 1 SCK MISO MOSI 1 2 3 4 5 6 7 8 JP26 ATMEGA_8 JP28 HEADER 8 DeccanRobots 25 www.deccanrobots.com User manual for PCAM Schematics – 7-Segment Display JP3 1 2 3 4 4 HEADER VCC R2 1K Q1 BC548A R3 1K R4 1K Q2 BC548A R7 1K Q3 BC548A Q4 BC548A . . . . . . . . . . . . . . . . . . . . 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 JP19 U2 HEADER 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 . . . . . . . . . . . . . . . . . . . . 40_PIN_IC_BASE 1 2 3 4 5 6 7 8 DeccanRobots 26 www.deccanrobots.com User manual for PCAM Schematics – ULN2803 Stepper Motor Driver JP23 1 2 3 4 5 6 7 8 8 HEADER U4 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 JP30 18 17 16 15 14 13 12 11 10 18 17 16 15 14 13 12 11 10 8 7 6 5 4 3 2 1 VCC ULN2803 DeccanRobots 27 www.deccanrobots.com User manual for PCAM Schematics – 8 Bit ADC VCC R16 10K C6 VCC 150 1 JP49 2 1 2 3 U10 . . . . . . . . . . . . . . . . . . . . 1 2 20 19 18 17 16 15 14 13 12 11 OUTPUT 8 7 6 5 4 3 2 1 JP37 20_PIN VCC JP50 R14 1 3 2 R25 20K 1 2 3 4 5 6 7 8 9 10 R15 10K 10K DeccanRobots 28 www.deccanrobots.com User manual for PCAM Schematics – RS232 DTR JP43 U14 FEMALE CONNECTOR DB9 JP48 13 8 11 10 1 6 2 7 3 8 4 9 5 C10 C9 1 3 4 5 2 6 VCC R1IN R2IN T1IN T2IN C+ C1C2+ C2V+ V- TX R1OUT R2OUT T1OUT T2OUT 12 9 14 7 RX 1 2 3 HEADER 3 VCC GND VCC 15 16 MAX232/SO C11 C8 DeccanRobots 29 www.deccanrobots.com User manual for PCAM Schematics – LED D1 RP1 VCC 1 C 2 3 4 5 6 7 8 9 D2 D3 D4 D5 D6 D7 1K D8 DeccanRobots JP5 1 2 3 4 5 6 7 8 8 HEADER 30 www.deccanrobots.com User manual for PCAM Schematics – Switches • 4 x Pulled up & 2 x pulled down switches VCC VCC R6 1 1K R5 1 1K R10 1K 2 SW2 1 2 SW3 1 2 SW4 1K R9 2 SW1 JP15 1 2 R11 1 1K R12 JP16 1K 1 2 SW5 JP18 1 2 2 SW6 1 2 DeccanRobots 31 www.deccanrobots.com User manual for PCAM Schematics – Real Time Clock DS1307 VCC SDA_1 R181K X1 CRYSTAL R201K R191K SCL_1 1 2 3 1 2 6 3 8 VCC JP36 U8 X1 X2 SCLK SDA SQW/OUT 5 7 VBAT VCC JP29 DS1307 1 2 EXERNAL BATTERY CONNECTION DeccanRobots 32 www.deccanrobots.com User manual for PCAM Schematics – EEPROM 24C256 VCC U9 SCL_1 1 2 3 6 7 A0 A1 A2 SCLK WP VCC SDA GND 8 5 SDA_1 4 AT24C256 DeccanRobots 33 www.deccanrobots.com User manual for PCAM Schematics – L293D DC Motor Driver JP5 1 2 3 JP6 2 1 JP7 2 1 VCC U13 1 2 3 4 5 6 7 8 E1 I1 O1 GND GND O2 I2 VS VSS I4 O4 GND GND O3 I3 E2 L293D DeccanRobots 16 15 14 13 12 11 10 9 JP8 1 2 1 2 3 JP9 34 www.deccanrobots.com User manual for PCAM Schematics – 4x4 Keypad SW5 SW1 RP2 1 C 2 3 4 5 6 7 8 9 SW13 SW2 SW6 SW10 SW14 SW3 SW7 SW11 SW15 SW4 SW8 SW12 SW16 1K 8 7 6 5 4 3 2 1 VCC SW9 JP42 HEADER 8 DeccanRobots 35 www.deccanrobots.com User manual for PCAM Schematics – 16x2 LCD JP6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 FEMALE CONNECTOR VCC VCC JP14 2 1 JP7 1 2 3 4 5 6 7 8 R8 1 47K 2 R1 1K 3 1 2 3 JP4 DeccanRobots 36 www.deccanrobots.com User manual for PCAM Schematics – 93C46 EEPROM DI SK CS DO JP24 93C46 JP31 VCC 3 2 1 4 GND 3 2 1 4 6 6 1 2 3 HEADER 3 5 U6 8 VCC DeccanRobots 37 www.deccanrobots.com User manual for PCAM Schematics – IR, Temperature & Preset JP38 HEADER 5 5 4 3 2 1 VCC VCC 1 D9 IR Transmitter R17 Q5 LM35 2 3 200E VCC U11 R21 10K R22 200E 2 R24 5K 3 C7 1 VCC 1 2 3 1 2 3 TSOP1738 VCC IR RECEIVER U5 D2 6 2 R23 10K 8 6 7 8 7 LM358 3 4 R13 5K 5 4 1 5 DeccanRobots 38 www.deccanrobots.com User manual for PCAM Schematics – Power Supply VCC VCC R26 1K U12 JP45 1 O/P VIN 3 GND 3 2 1 CONN JACK JP44 2 7805 C12 C14 C13 1 2 D11 LED 1000uF, 16V DeccanRobots 39 www.deccanrobots.com User manual for PCAM For First Time Users • Connect 9 to 12V DC power to the hardware. • Green LED should glow with power on. • By default, 89S52 microcontroller is mounted on the board. • To use AVR microcontroller with this hardware, remove 89S52 using IC Extractor or with the help of small tip screw driver. Place AVR microcontroller in appropriate socket (Refer previous pages of this user manual for AVR Sockets). DeccanRobots 40 www.deccanrobots.com User manual for PCAM Programming the Microcontroller • Use HandyProgUSB ISP programmer to program the target microcontroller. Connect HandyProgUSB ISP to the board as shown on page 2. Other end of the HandyProgUSB ISP Programmer can be directly inserted to USB Port or to the USB extension cable. • Install & use HandyProgUSB Software to program the target microcontroller. • A detailed procedure for HandyProgUSB Software is described on next page. DeccanRobots 41 www.deccanrobots.com 1 User manual for PCAM HandyProgUSB Software Select Target Microcontroller Select Actions 2 Select Flash Hex File 3 Select EEPROM Hex File (Only for AVR) Start Programming 4 Status messages will appear here. DeccanRobots 42 www.deccanrobots.com User manual for PCAM Interfacing Microcontroller with the Interfacing circuits – Step 1 Use the female to female connectors provided with the product to connect microcontroller’s port to the interface circuits. DeccanRobots 43 www.deccanrobots.com User manual for PCAM Interfacing Microcontroller with the Interfacing circuits – Step 2 • Write the firmware program using 8051IDE for 89S52 and WinAVR for AVR microcontrollers. • Assemble / Compile the program to generate Hex file. • Load the Hex file into HandyProgUSB Software. • Connect HandyProgUSB Programmer to the kit and Program your hex file into the target microcontroller. • Once the programming gets over, target microcontroller is put in Run mode automatically. DeccanRobots 44 www.deccanrobots.com User manual for PCAM Information DeccanRobots 205, Decision Tower, Next To CityPride, Satara Road, Pune 411037 India Ph: +91 20 24228818 (Not for support) www.deccanrobots.com support@deccanrobots.com Send your support query only via email. Disclaimer: PCAM (Practical Course For ATMEL Microcontroller) is designed only for learning and experiments. This product is not designed for mission critical applications and industrial product development. DeccanRobots 45