Trong file "HardwareProfile.h"
Code:
#if defined(__C30__)
#if defined(__PIC24FJ256GB110__)
#include "HardwareProfile - PIC24FJ256GB110 PIM.h"
#elif defined(__PIC24FJ256GB106__)
#include "HardwareProfile - PIC24F Starter Kit.h"
#endif
#endif
Trong file "HardwareProfile - PIC24FJ256GB110 PIM.h"
Mình sửa code như sau
Code:
//#define USE_USB_BUS_SENSE_IO
//#define tris_usb_bus_sense TRISDbits.TRISD0 // Input
//#define USB_BUS_SENSE 1
#define tris_usb_bus_sense U1OTGSTATbits.SESVD //TRISBbits.TRISB5 // Input
#define USB_BUS_SENSE U1OTGSTATbits.SESVD
Hai dòng cuối là mình copy từ bên file "HardwareProfile - PIC24F Starter Kit.h" sang, nhưng USB vẫn không hoạt động.
Có bạn nào đã làm không, có cách nào khác chỉnh sửa thiết kế không? mình có header nên có thể nối dây được.
Ngoài ra, mình dùng nguồn từ USB để hoạt động.