AKIOM
Joined: 16 May 2014 Posts: 11
|
Need help for USB with DSPIC33EP256MU806 |
Posted: Wed Jul 23, 2014 6:50 am |
|
|
I decide to use DSPIC33EP256MU806 in my image-sensor project because it has 12 bit A/D converter, support USB interface and fast operation (70MIPS).
I design a test circuit for DSPIC33EP256MU806 that has an crystal 8Mhz. I test it with changing output port RB0 from high to low (no USB) and it works well. After I test with my USB code and connect PIC via USB port to my computer, the computer (Windows xp) hangs or sometime, shows that my device is malfunction. Then, I neatly check my circuit connection but there is no error in my circuit.
When I use oscilloscope for detection signal from D+ and D-, it shows me only negative voltage about 3V (no other signals). I use all 5 days for testing it but I can not to solve this problem. How can
I do? Please help me to solve this problem. I should buy evaluation board from microchip to test USB function or not. Has Someone ever been use this microcontroller ?
I use DSPIC33EP256MU806 and 5.024 ccs compiler.
Thank you very much.
AKIOM
Code: |
#include <33EP256MU806.h>
#use delay(crystal=8Mhz, clock=120Mhz, AUX:clock=48Mhz)
#include <usb_cdc.h>
#include <stdlib.h>
void main() {
usb_cdc_init();
//usb_init_cs();
usb_init(); //init USB and enable USB interrupt.
while(TRUE) {
usb_task();
If (usb_enumerated())//Returns TRUE if the device has been enumerated(specified)by the PC.
{
printf(usb_cdc_putc, "\n\rAkiom");//my name
}
}
delay_ms(50);
} |
This is my schematic VDD_PIC=DVDD
http://postimg.org/image/401dgtnqt/
Another picture is signal between D+ and D-
http://s2.postimg.org/aame84pjd/D_D.png
Signal test with port B0 (no usb interface )
http://s7.postimg.org/xb1h1qemz/TEK00000.png |
|