Ir ao conteúdo
  • Cadastre-se

Henrique Morais

Membro Júnior
  • Posts

    11
  • Cadastrado em

  • Última visita

  1. Para minha surpresa, depois de um tempo eu descobri o que estava deixando lento. Onde comprei a máquina, eles mandaram o dissipador um pouco frouxo e estava aquecendo o processador e ocasionando esse problema, ao passar mais pasta térmica e apertar o dissipador a máquina voltou a funcionar normalmente. E sobre o problema de não conseguir formatar o NVMe, tinha que ser somente com o pendrive formatado em gpt. Obrigado a todos que responderam.
  2. @SAFEDISK o SSD eu testei em outra placa com o mesmo cabo, também testei na placa b75 revenger com outro cabo. Dá o mesmo problema na b75. Após formatado é uma lentidão tremenda.
  3. @SAFEDISK por via das dúvidas troquei, mas continua e o NVMe é direto na placa. Testei com outra fonte atx nada. Porém se eu formato o SSD em outra placa fica normal. Quando passo pra b75 fica lento novamente.
  4. @Edvaldo J. Frederico Não, eu tentei somente com o NVMe primeiro e depois somente com SSD sata. placa-mãe revenger b75, 8gb RAM, i5 de 3° e testei com 2 placas de vídeo g210 1gb e gt740 4gb. Ambas tem o mesmo resultado.
  5. Olá, espero que estejam todos bem. Tentei formatar o NVMe e o SSD na placa-mãe revenger b75 e acontece que fica muito lento, e eu só consigo formatar o NVMe quando o pendrive está no formato uefi/gpt. O SSD eu consigo formatar em mbr porém de qualquer forma ocasiona uma lentidão absurda. Tentei verificar se não era memória, cpu, fonte e nada. Se alguém ja passou por isso, creio que seja alguma configuração do BIOS, mas não tenho certeza. Desde já agradeço.
  6. Caros Amigos, Tenho umas grande dúvida e não consegui achar pesquisando. Alguém sabe se há a possibilidade de calibrar os controladores de jogos diretamente no registro do windows ou então em algum arquivo .conf ???
  7. @alexandre.mbm pinos 15 e 16 do pic18f2550, D- e D+ respectivamente.
  8. Saudações. Gostaria de uma indicação de onde comprar microcontrolador pic18f2550 smd ou comum? Ou alguma indicação de microcontrolador que tenha suporte usb e seja mais fácil de encontrar. Esse pic18f2550 e o 4550 estão muito complicado para se achar no BRASIL.
  9. @vtrx Obrigado pela atenção, vou testar aqui e retorno... estranho que pelo proteus funciona normal.
  10. Boa noite, estava com esse problema, porém o meu era sujeira na tecla pg up. Baixa esse programa e testa se tem teclas acionadas no seu também. https://www.google.com/amp/s/m.baixaki.com.br/amp/download/keyboardtest.htm
  11. Boa Noite Pessoal, estou com um problema com a comunicação USB com pic18f2550. Construí um dispositivo usb(joystick), porém no proteus ele funciona normal, no MCU ele reconhece, mas os botões e eixos nao funcionam. codigo: unsigned char readbuff[64] absolute 0x500; unsigned char writebuff[64] absolute 0x540; char btn = 0x00; short eixoX, eixoY, eixoZ = 0; void interrupt() { USB_Interrupt_Proc(); } void readJoy(){ ADC_Init(); //------------ Bloco que converte o eixo Y -------------------- eixoY = ADC_Read(1)/4; eixoY = eixoY - 127; if(eixoY >= -5 && eixoY <= 5)PORTA.RA4 = 1; else PORTA.RA4 = 0; //----------- Conversão do eixo X ------------- eixoX = ADC_Read(0)/4; eixoX = eixoX - 127; if(eixoX >= -5 && eixoX <= 5)PORTA.RA3 = 1; else PORTA.RA3 = 0; //----------- Conversão do eixo Z digital----------- eixoZ = 0; if(!PORTA.RA2) eixoZ = 127; else {eixoZ = -127;} //------------ Acionamento dos botões ----------------- if(!PORTB.RB0) btn.RB0 = 1; else btn.RB0 = 0; if(!PORTB.RB1) btn.RB1 = 1; else btn.RB1 = 0; if(!PORTB.RB2) btn.RB2 = 1; else btn.RB2 = 0; if(!PORTB.RB3) btn.RB3 = 1; else btn.RB3 = 0; if(!PORTB.RB4) btn.RB4 = 1; else btn.RB4 = 0; if(!PORTB.RB5) btn.RB5 = 1; else btn.RB5 = 0; if(!PORTB.RB6) btn.RB6 = 1; else btn.RB6 = 0; if(!PORTB.RB7) btn.RB7 = 1; else btn.RB7 = 0; // -------------- envia os dados para o buffer do usb ------------ writebuff[0] = btn; writebuff[1] = eixoX; writebuff[2] = ~eixoY; writebuff[3] = eixoZ; while(!HID_Write(writebuff,9)); } void main() { TRISB = 255;//define portb como entrada TRISA = 255; TRISC = 255; ADCON1 = 0x0D;//altera as entradas A0 e A1 analogicas PORTA = 0; PORTB = 0; PORTC = 0; CMCON = 0x07; HID_Enable(&readbuff, &writebuff); while(1){ readJoy(); Delay_ms(100); } } HID Descritor: const unsigned int USB_VENDOR_ID = 0x0123; const unsigned int USB_PRODUCT_ID = 0x0001; const char USB_SELF_POWER = 0x80; // Self powered 0xC0, 0x80 bus powered const char USB_MAX_POWER = 50; // Bus power required in units of 2 mA const char HID_INPUT_REPORT_BYTES = 64; const char HID_OUTPUT_REPORT_BYTES = 64; const char USB_TRANSFER_TYPE = 0x03; //0x03 Interrupt const char EP_IN_INTERVAL = 1; const char EP_OUT_INTERVAL = 1; const char USB_INTERRUPT = 1; const char USB_HID_EP = 1; const char USB_HID_RPT_SIZE = 44; /* Device Descriptor */ const struct { char bLength; // bLength - Descriptor size in bytes (12h) char bDescriptorType; // bDescriptorType - The constant DEVICE (01h) unsigned int bcdUSB; // bcdU SB - USB specification release number (BCD) char bDeviceClass; // bDeviceClass - Class Code char bDeviceSubClass; // bDeviceSubClass - Subclass code char bDeviceProtocol; // bDeviceProtocol - Protocol code char bMaxPacketSize0; // bMaxPacketSize0 - Maximum packet size for endpoint 0 unsigned int idVendor; // idVendor - Vendor ID unsigned int idProduct; // idProduct - Product ID unsigned int bcdDevice; // bcdDevice - Device release number (BCD) char iManufacturer; // iManufacturer - Index of string descriptor for the manufacturer char iProduct; // iProduct - Index of string descriptor for the product. char iSerialNumber; // iSerialNumber - Index of string descriptor for the serial number. char bNumConfigurations; // bNumConfigurations - Number of possible configurations } device_dsc = { 0x12, // bLength 0x01, // bDescriptorType 0x0200, // bcdUSB 0x00, // bDeviceClass 0x00, // bDeviceSubClass 0x00, // bDeviceProtocol 8, // bMaxPacketSize0 USB_VENDOR_ID, // idVendor USB_PRODUCT_ID, // idProduct 0x0001, // bcdDevice 0x01, // iManufacturer 0x02, // iProduct 0x00, // iSerialNumber 0x01 // bNumConfigurations }; /* Configuration 1 Descriptor */ const char configDescriptor1[]= { // Configuration Descriptor 0x09, // bLength - Descriptor size in bytes 0x02, // bDescriptorType - The constant CONFIGURATION (02h) 0x29,0x00, // wTotalLength - The number of bytes in the configuration descriptor and all of its subordinate descriptors 1, // bNumInterfaces - Number of interfaces in the configuration 1, // bConfigurationValue - Identifier for Set Configuration and Get Configuration requests 0, // iConfiguration - Index of string descriptor for the configuration USB_SELF_POWER, // bmAttributes - Self/bus power and remote wakeup settings USB_MAX_POWER, // bMaxPower - Bus power required in units of 2 mA // Interface Descriptor 0x09, // bLength - Descriptor size in bytes (09h) 0x04, // bDescriptorType - The constant Interface (04h) 0, // bInterfaceNumber - Number identifying this interface 0, // bAlternateSetting - A number that identifies a descriptor with alternate settings for this bInterfaceNumber. 2, // bNumEndpoint - Number of endpoints supported not counting endpoint zero 0x03, // bInterfaceClass - Class code 0, // bInterfaceSubclass - Subclass code 0, // bInterfaceProtocol - Protocol code 0, // iInterface - Interface string index // HID Class-Specific Descriptor 0x09, // bLength - Descriptor size in bytes. 0x21, // bDescriptorType - This descriptor's type: 21h to indicate the HID class. 0x01,0x01, // bcdHID - HID specification release number (BCD). 0x00, // bCountryCode - Numeric expression identifying the country for localized hardware (BCD) or 00h. 1, // bNumDescriptors - Number of subordinate report and physical descriptors. 0x22, // bDescriptorType - The type of a class-specific descriptor that follows USB_HID_RPT_SIZE,0x00, // wDescriptorLength - Total length of the descriptor identified above. // Endpoint Descriptor 0x07, // bLength - Descriptor size in bytes (07h) 0x05, // bDescriptorType - The constant Endpoint (05h) USB_HID_EP | 0x80, // bEndpointAddress - Endpoint number and direction USB_TRANSFER_TYPE, // bmAttributes - Transfer type and supplementary information 0x40,0x00, // wMaxPacketSize - Maximum packet size supported EP_IN_INTERVAL, // bInterval - Service interval or NAK rate // Endpoint Descriptor 0x07, // bLength - Descriptor size in bytes (07h) 0x05, // bDescriptorType - The constant Endpoint (05h) USB_HID_EP, // bEndpointAddress - Endpoint number and direction USB_TRANSFER_TYPE, // bmAttributes - Transfer type and supplementary information 0x40,0x00, // wMaxPacketSize - Maximum packet size supported EP_OUT_INTERVAL // bInterval - Service interval or NAK rate }; const struct { char report[]; }hid_rpt_desc = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x05, // USAGE (Game Pad) 0xa1, 0x01, // COLLECTION (Application) 0xa1, 0x00, // COLLECTION (Physical) 0x05, 0x09, // USAGE_PAGE (Button) 0x19, 0x01, // USAGE_MINIMUM (Button 1) 0x29, 0x08, // USAGE_MAXIMUM (Button 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x95, 0x08, // REPORT_COUNT (8) 0x75, 0x01, // REPORT_SIZE (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x30, // USAGE (X) 0x09, 0x31, // USAGE (Y) 0x09, 0x32, // USAGE (Z) 0x15, 0x81, // LOGICAL_MINIMUM (-127) 0x25, 0x7f, // LOGICAL_MAXIMUM (127) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x04, // REPORT_COUNT (4) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0xc0 // END_COLLECTION }; //Language code string descriptor const struct { char bLength; char bDscType; unsigned int string[1]; } strd1 = { 4, 0x03, {0x0409} }; //Manufacturer string descriptor const struct{ char bLength; char bDscType; unsigned int string[17]; }strd2={ 36, //sizeof this descriptor string 0x03, {'J','O','Y'} }; //Product string descriptor const struct{ char bLength; char bDscType; unsigned int string[14]; }strd3={ 30, //sizeof this descriptor string 0x03, {'F','i','r','s','t','S','u','c','e','s','s'} }; //Array of configuration descriptors const char* USB_config_dsc_ptr[1]; //Array of string descriptors const char* USB_string_dsc_ptr[3]; void USB_Init_Desc(){ USB_config_dsc_ptr[0] = &configDescriptor1; USB_string_dsc_ptr[0] = (const char*)&strd1; USB_string_dsc_ptr[1] = (const char*)&strd2; USB_string_dsc_ptr[2] = (const char*)&strd3; } Ligação no proteus está igual a ligação na ProtoBoard:

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...