Home

Información básica

image

Contents

1. Use Settings from TOOLS INI BIN Folder AB 00 E3 INC Folder CACupress USB TargeMneXCAKeiNCEINNE LIB Folder EXXBINCBILIBN E Reafile Folder Figura 4 5 conectar al puerto USB la placa del microcontrolador ejecutar el programa Inicio Todos los programas Cypress EZ USB Control Panel y con la opci n Download descargar el archivo hex generado en el paso anterior Figura 5 ES EZ USB Control Panel Ezusb 0 de File Edit wiew Options Tools Window Help El Open All Target IFX2 Get Pipe Info P Sena Device Ezusb 0 lear Get Dew Get Cont GetPipes Get String Download EEPROM URB Stat HOLO vend Req Req value 0Xx0000 Index OxBEEF lenah 16 br 11N Hex Bytes BD 47 05 80 0001 0 lso Trans Pipe Packets Size Buffers Frames Buffer Length Hex Bytes 5 ResetFipe PbortPipe Fileians Pipe SetlFace Interface jo altsetting O EZ USB Control Panel built 11 31 58 Sep 17 002 Get Pipelnto Interface Size 15 Bulk iint Pipe For Help press F1 Figura 5 Universidad de Vigo DTE SED 2010 6 Camilo Quint ns y Miguel Angel Dom nguez
2. TI O and 0 ES0 1 enables interrupts generated by the O or RI O flag ET1 Enable Timer 1 interrupt ET1 0 disables Timer 1 interrupt TF1 ET121 enables interrupts generated by the TF 1 flag EX1 Enable external interrupt 1 EX1 0 disables external interrupt 1 INT1 EX1 1 enables interrupts generated by the INT1 pin ETO Enable Timer 0 interrupt ETO O disables Timer 0 interrupt TFO ETO 1 enables interrupts generated by the TFO flag EXO Enable external interrupt 0 EXO 0 disables external interrupt 0 INTO EX0 1 enables interrupts generated by the INTO pin NOTAS SOBRE LA DOCUMENTACI N Una vez instalado el software de uvision2 en el directorio C VKeiNC51NHLP se encuentra el archivo GS51 pdf del manual de usuario En este manual se debe estudiar principalmente el cap tulo 4 que explica c mo crear un proyecto y los cap tulos 6 y 7 relativos a c mo usar el depurador Por otro lado en el directorio C Cypress USBWMDocW X2 se encuentra el archivo FX2 TechRefManual pdf del manual del microcontrolador Para programar el microcontrolador se utiliza el programa EZ USB Control Panel con la opci n FX2 Universidad de Vigo DTE SED 2010 Camilo Quint ns y Miguel Angel Dom nguez INSTRUCCIONES B SICAS PARA HACER EL PROGRAMA DE LA PR CTICA 7 1 Ejecutar el programa Inicio Todos los programas Keil uVision2 y crear un nuevo proyecto con la opci n Proyect Nex Projet Luego en el fic
3. TCON 6 TR1 Timer 1 run control 1 Enable counting on Timer 1 TCON 5 TFO Timer 0 overflow flag Set to 1 when the Timer 0 count overflows automatically cleared when the FX2 vectors to the interrupt service routine TCON 4 TRO Timer 0 run control 1 Enable counting on Timer 0 TCON 3 IE1 Interrupt 1 edge detect If external interrupt 1 is configured to be edge sensitive IT1 1 IE1 is set when a negative edge is detected on the INT1 pin and is automat ically cleared when the FX2 vectors to the corresponding interrupt service routine In this case IE1 can also be cleared by software If external interrupt 1 is configured to be level sensitive IT1 0 IE1 is set when the INT1 pin is O and automatically cleared when the INT1 pin is 1 In level sensitive mode software cannot write to IE 1 TCON 2 IT1 Interrupt 1 type select INT1 is detected on falling edge when IT1 1 INT1 is detected as a low level when IT1 0 TCON 1 IEO Interrupt O edge detect If external interrupt O is configured to be edge sensitive ITO 1 IEO is set when a negative edge is detected on the INTO pin and is automat ically cleared when the FX2 vectors to the corresponding interrupt service routine In this case IEO can also be cleared by software If external interrupt 0 is configured to be level sensitive ITO 0 IEO is set when the INTO pin is O and automatically cleared when the INTO pin is 1 In level sensitive mode software cannot write t
4. Vigo DTE SED 2010 Camilo Quint ns y Miguel Angel Dom nguez REGISTRO TMOD 0x89 GATE1 Timer 1 gate control When GATE1 1 Timer 1 will clock only when INT1 1 and TR1 TCON 6 1 When GATE1 0 Timer 1 will clock only when TR1 1 regardless of the state of INT1 CIT1 Counter Timer select When C T1 0 Timer 1 is clocked by CLKOUT 4 or CLKOUT 12 depending on the state of T1M CKCON 4 When C T1 1 Timer 1 is clocked by high to low transitions on the T1 pin M1 Timer 1 mode select bit 1 MO Timer 1 mode select bit O Mode Mode 0 13 bit counter Mode 1 16 bit counter Mode 2 8 bit counter with auto reload Mode 3 Timer 1 stopped GATEO Timer 0 gate control When GATEO 1 Timer 0 will clock only when INTO 1 and TRO TCON 4 1 When GATEO 0 Timer 0 will clock only when TRO 1 regardless of the state of INTO C TO Counter Timer select When C TO 0 Timer 0 is clocked by CLKOUT 4 or CLKOUT 12 depending on the state of TOM CKCON 3 When C TO 1 Timer 0 is clocked by high to low transitions on the TO pin M1 Timer O mode select bit 1 MO Timer 0 mode select bit 0 Mode Mode 0 13 bit counter Mode 1 16 bit counter Mode 2 8 bit counter with auto reload Mode 3 Two 8 bit counters REGISTRO TCON 0x88 TCON 7 TF1 Timer 1 overflow flag Set to 1 when the Timer 1 count overflows automatically cleared when the FX2 vectors to the interrupt service routine
5. el fichero de salida hex Options for Target Target 1 x Target Output Listing c51 A51 BL51 Locate BL51 Misc Debug Cypress Semiconductor EZ LISB F2 D r CERAR tal MHz 8 Memory Model Small variables in DATA Code Rom Size Large program Use multiple OPTRA registers Operating system None Use On chip SRM 0 0 03FF Off chip Code memory Off chip data memory Shark Size Start Size EM I Code Banking Start End 181 Start End Banks Bank Area Banks Bank rea Cancelar Default Figura 2 Universidad de Vigo DTE SED 2010 5 Camilo Quint ns y Miguel Angel Dom nguez Options for Target Target 1 Target Output Listing c51 A51 BL51 Locate BL51 Misc Debug of Executable practica f Create Executable 9 w Debug Information Browse Information W Create HEX File HE Format HEX B0 gt Start End t Create Library ApracticaS LIB After Make Beep hen Complete Start Debugging Run User Program 1 Brovuse Run User Program 2 Browse Aceptar Cancelar Defaults Figura 3 4 En la opci n Project File Extensions Books and Enviroment Enviroment setup afadir la ruta de los archivos de las bibliotecas del dispositivo C Cypress USB Target Inc Figura 4 Setup File Extensions Books and Environment File Extensions Add Books Environment Setup
6. PLACA DEL MICROCONTROLADOR CY7C66013 T she IU ASS RE I WA Salida 3 3 V Entrada 5 V PUERTO A PUERTO B MEMORIA INTERNA DE DATOS 256 bytes Lower 128 Indirect addressing only OxFF OxFF General Purpose Upper 128 SFR Space 0x80 0x80 Ox7F Register Bank Select Direct addressing only Lower 128 0x00 10 0 po R0 R7 Bank 1 Direct or indirect addressing 0 oxod Bank 0 REGISTRO DE CONTROL DE LA CPU CPUCS CPU Control and Status E600 LLL erasa o GACETA PORTCSTB CLKSPD1 CLKSPDO CLKINV CLKOE a TW Ww zd UN A 0 0 0 0 0 0 1 0 48 MHz Reserved 1 0 Universidad de Vigo DTE SED 2010 Camilo Quint ns y Miguel Angel Dom nguez TEMPORIZADORES 0 1 MODOS 0 1 TOM or T1M Divide by 12 I a CLK TLO or TL1 GIT 0 4 7 Divide by 4 TRO or TR1 CLKOUT TO or T1 pin GATE INTO or INT1 pin TFO or TF1 INT 4 NE To Serial Port Timer 1 only CONFIGURACI N PUERTOS ENTRADA SALIDA OEA Port A Output Enable SFR 0xB2 b4 b3 OEx Bit IOA Port A Bit Addressable SFR 0x80 b7 b6 b5 b4 b3 b2 b1 b0 D7 D6 D5 D4 D3 D2 D1 DO RW RW RW RN RW RW RW RW x x x x x x x x IOB Port B Bit Addressable SFR 0x90 D7 D6 0 D2 D1 DO RW RW RW RW RW RW RW RW x x X x x x Universidad de
7. hero del programa incluir en la cabecera del programa las siguientes directivas de compilaci n En el caso de que se programe en C En el caso de que se programe en ensamblador include Fx2 h NOMODS531 Inhibe registros del 8051 predefinidos include Fx2regs h INCLUDE fx2regs inc Salvar el archivo del c digo fuente con extensi n c si se codifica en lenguaje C y con extensi n A51 si se codifica en ensamblador Fijarse si el m dulo fuente el archivo con el programa est en la ventana del manejador de proyectos de uVision2 si no es as afiadirlo con la opci n Add Files to Group 2 En la opci n Project Select Device for Target Target 1 seleccionar el dispositivo EZ USB FX2 Figura 1 Select Device for Target Target 1 CPU Vendor Cypress Semiconductor Device EZ USB Fx2 Dr PCBS Use Lx51 instead of BL51 Famil MES 51 L Data base Description Cypress Semiconductor 28051 bases USB 2 0 controller two UART s Dual OPTRA 3 EZ USB AN2 1 40 1 0 lines 3 TimersCounters EZ USB Fes ertet 256 Bytes on chip SEB on chip program AR on chip USB Endpoint RAM with master slave or programmable PIF control Ait 41 Interrupts B priority levels Cf Figura 3 En la opci n Project Options for Target Target 1 Target configurar la frecuencia del reloj Figura 2 y en la opci n Project Options for Target Target 1 Output activar la orden de generar
8. o IEO TCON O ITO Interrupt O type select INTO is detected on falling edge when ITO 1 INTO is detected as a low level when ITO 7 O Universidad de Vigo DTE SED 2010 Camilo Quint ns y Miguel Angel Dom nguez INTERRUPCIONES DEL FX2 Bit EF IE 6 IE 5 IE 4 IE 3 IE 2 IE 1 IE O FX2 Interrupt IEO TFO IE1 TF1 RI O amp TI_O TF2 Resume RI_1 amp TI_1 USBINT I2CINT IE4 IE5 IE6 Source INTO Pin Timer 0 Overflow INT1 Pin Timer 1 Overflow USARTO Rx amp Tx Timer 2 Overflow WAKEUP WU2 Pin or USB Resume USART1 Rx amp Tx USB I C Compatible Bus GPIF FIFOs INT4 Pin INT5 Pin INT6 Pin Function Interrupt Vector 0x0003 0x000B 0x0013 0x001B 0x0023 0x002B 0x0033 0x003B 0x0043 0x004B 0x0053 0x005B 0x0063 Natural Priority 1 O A O N 11 12 EA Global interrupt enable Controls masking of all interrupts except USB wakeup resume EA 0 disables all interrupts except USB wakeup When EA 1 interrupts are enabled or masked by their individual enable bits ES1 Enable Serial Port 1 interrupt ES1 0 disables Serial port 1 interrupts TI 1 and RI 1 ES1 1 enables interrupts generated by the 1 or 1 flag ET2 Enable Timer 2 interrupt ET2 0 disables Timer 2 interrupt TF2 ET2 1 enables interrupts generated by the TF2 or EXF2 flag ESO Enable Serial Port 0 interrupt ESO 0 disables Serial Port 0 interrupts

Download Pdf Manuals

image

Related Search

Related Contents

here - Baumatic  User Manual - ACube Systems  Dell OptiPlex GX620 – Benutzerhandbuch  Salary Planning Application - Financial Management and Budget  日本語版(Japanese)  Epson EB-Z8000WUNL  Package Slip PACKB.EV-CC-AC1-M3-C  AGERUL Limpia Baños - CEOSA Tienda On-Line  OmniMount 75/100CL  取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file