Usb

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Usb as PDF for free.

More details

  • Words: 206
  • Pages: 4
Universidad Politécnica Salesiana Facultad de ingenierías Ingeniería Electrónica Integrantes:

Esteban Arrieta Carlos Malla Alejandro Valencia Santiago Yánez

COMUNICACIÓN USB A través de la siguiente práctica ejemplifica la comunicación entre el pc y un microcontrolador pic 18f4550 usb. CÓDIGO Program usb dim k as byte dim userRD_buffer as byte[64] dim userWR_buffer as byte[64] sub procedure interrupt asm CALL _Hid_InterruptProc nop end asm end sub sub procedure Init_Main INTCON = 0 INTCON2 = $F5 INTCON3 = $C0 RCON.IPEN = 0 PIE1 = 0 PIE2 = 0 PIR1 = 0 PIR2 = 0 ADCON1 = ADCON1 or $0F TRISA = 0 TRISB = 0 TRISC = $FF TRISD = $FF TRISE = $07 LATA = 0 LATB = 0 LATC = 0 LATD = 0 LATE = 0 asm

LFSR FSR0, $000 MOVLW $08 CLRF POSTINC0, 0 CPFSEQ FSR0H, 0 BRA $ - 2 end asm T0CON = $07; TMR0H = (65536 - 156) >> 8 TMR0L = (65536 - 156) and $FF INTCON.T0IE = 1 ' Enable T0IE T0CON.TMR0ON = 1 end sub main: Init_Main() Hid_Enable(@userRD_buffer, @userWR_buffer) do for k = 0 to 255 userWR_buffer[0] = k Hid_Write(@userWR_buffer, 1) next k loop until FALSE Hid_Disable end.

DIAGRAMA

CIRCUITO IMPLEMENTADO

FOTOGRAFÍA DE LA COMUNICACIÓN EN UN TERMINAL VIRTUAL HID

Related Documents

Usb
April 2020 22
Usb
May 2020 17
Usb
July 2020 20
Usb
June 2020 18
Usb
May 2020 20
Usb
May 2020 9