I wil check again everything i done.. Possibble i made a mistakeee
I wil check again everything i done.. Possibble i made a mistakeee
reduce your code to a blink test and post everything here using the code tags...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks for your interest.
This is what I have done.. So I want to make serial connection
Now i reduced my code.. Now it's working... but if I use PAUSE 1000 without for.. next, it interrupts USB connection.. But leds blinking right time... I will try now serial connection again..
Another question : For what do I need DEFINE RESET_ORG 800h and DEFINE INTERRUPT_ORG 808h ?
define OSC 48
DEFINE LOADER_USED 1
DEFINE RESET_ORG 800h
DEFINE INTERRUPT_ORG 808h
I VAR word
LOW PORTB.0
HIGH PORTB.1
USBINIT
dongu:
FOR I=1 TO 1000
usbservice
pause 1
NEXT I
toggle portb.0
toggle portb.1
goto dongu
Yup, USBService work a treat when you take care of it each millisecondes or so. Another route is to use a Timer intterrupt such as in the first USBDemo version.
EVEN BETTER, look at the following modified version A.K.A post #148 which use Darrel's instant interrupts...
http://www.picbasic.co.uk/forum/show...&postcount=148
so now you no longer need to care about USBSERVICE, it will be done automatically... BUT i've NEVER tried with the bootloader firmware installed![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Can you tell me or give me the code, how can I add TMR0 interrupt to my project ?
But I understood after your explenation what this lines mean
DEFINE RESET_ORG 800h
DEFINE INTERRUPT_ORG 808h
I think Interrupts begins after 808h so when an interrupt occurs it will not jump to bootloaders section .. Can be ?
Last edited by serkanc; - 29th October 2008 at 19:45.
have a look at USBDemo, first post, first code, everything should be clear after that.
http://www.picbasic.co.uk/forum/showthread.php?t=5418
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks