I know that. But look to top line of his pic code.
The top line says DEFINE OSC 48
Which seems correct from the image of the configs which shows an 8Mhz crystal with HS_PLL that gives 96Mhz.
The USBPLL is /2 so the USB gets 48Mhz, and the CPUDIV is also /2 so it's running at 48Mhz.
Except for the LVP, it all seems good.
Well, might want to disable XINST too.
<br>
DT
thx for ur reply
i ll try to disable lvp and xinst and see what happen
brb
OMG, it worked
thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaank you Darrel for taking time to read the code and reply me. thank u very much
and thx pedja for trying to help.
Darrel, why LVP is so important in this case?
i thought LVP stands for low voltage programming. and since i used k128 usb programmer i thought lvp must be enabled ( i read once that k128 uses low voltage programming for usb compatible pics).
Great News! And you're welcome.
I'm not familiar with the K128 ...
But with a quick look at the schematic in the datasheet, it seems to use a series of diodes and capacitors to increase the voltage and applies it to VPP.
They have several different programmers.
The LVP comment might have been directed at a different product.
But when LVP is enabled ... anytime RB5/PGM goes HIGH ... it's just like taking MCLR/VPP to 13V.
If it's left floating, the PIC could be constantly entering Program Mode from input noise.
<br>
DT
hi
i need to know more about interrupts. when using usb communication i have to excute usbservice every milisecond or so. should interrupts help me ?
Bookmarks