http://www.picbasic.co.uk/forum/showthread.php?t=19638
Type: Posts; User: Demon; Keyword(s):
http://www.picbasic.co.uk/forum/showthread.php?t=19638
As in chat box,
http://www.picbasic.co.uk/forum/showthread.php?t=19638
Under 18 bit link.
Then DOWNLOAD link at very top.
Links are there.
Robert
Totally wild guess, Darrel's routine only has code for #1 and 2. Can't check includes and asm files from my phone, but I'd start there.
Robert
Try this as an intro to Darrel Interrupts and blinking LED:
http://darreltaylor.com/DT_INTS-14/blinky.html
It's worth the time to practice. His routines make things so much easier and flexible...
Steve, I'm trying to figure this out using math (gotta start sometime) and I'd like to know where you got the 12000000 from.
I read this link you posted in another thread:...
I'm going to solder a wire to 1 pin, blink that pin in the interrupt and connect my scope on the wire.
I don't know much about scopes, but I might be able to figure out the frequency.
Robert
:)
Ok, I disabled that code to disable/enable the USBSERVICE interrupt before the gosubs and now the interrupt is getting executed a LOT of times.
I can't say at what interval, but the counter is...
Do you have a suggestion?
Robert
:)
Steve, I don't know how to check how often the USBSERVICE interrupt is occurring. The only settings I have are the oscillator and prescaler:
DEFINE OSC 48
T1CON = $11 ;...
Hmmm, there is still something weird in the USBSERVICE interrupt routine.
- if I comment the gosubs for In and Out it is not recognized.
- if I replace them with a USBSERVICE it works.
...
I LOVE YOU mon maudit francais. :P
That was it, you can't mix the interrupt in there for some reason.
So now I disable the interrupt just before the GOSUB and ENABLE right after.
Robert
:)...
Hi Darrel,
I've found out why my device is not recognized, the USBSERVICE interrupt is either not working fast enough, or not working at all.
I used the generated PBP program from EasyHID to...
WHAT DO YOU MEAN "You don't know?" :D
Hmmm, I would tend to believe that flag does not distinguish between upload and download transactions; I really need a PC-to-PIC complete flag.
Well,...
Darrel,
How about this one? I have one interrupt to generate a USB Service, that part works fine. I'd like to add another interrupt for USB reception, is that what USB_INT is for?
Here is a...
Yup, that's what I was thinking, having the USB SERVICE come first, and have the USART interrupt 'whenever'.
Edit: WEEE !!!
Robert
:)
Maybe assigning high & low priorities might help you:
http://darreltaylor.com/DT_INTS-18/LowPriority.html
One problem I am having now is that an internal interrupt (USB Service) seems to lose...
Lez, you might want to check the USB forum for that information.
Robert
:)
The weird part is that the interrupts and the debugger worked nicely as long as the I2C command was outside the interrupt routine.
I suppose there are probably exceptions, but disabling/enabling...
2nd pic:
The program USB 18F2550 is for the master processor, that is not the one I am debugging. I am running the next program, MCP23016 16F628A.
Robert
:)
One note of interest, I kept hanging at the end of one of the interrupt modules, like it lost an address on the stack or something. I ran ICD and I saw the execution just hang on the ENDIF at the...
Step 5: Reactivated LCD logic along with USART and RX interrupt and device is still recognized.
Go figure, the LCD works properly even if I'm using pins C0 and C1 to output the data and commands...
I had screwed up the disabling/enabling of the interrupt during USB subroutines.
Step 4: Disabled TMR1 _before_ the assembler loop, manually issue USBSERVICE within the loop and then enabled TMR1...
Step 3: I skipped over all code relating with the LCD and it still is not recognized.
So now I've narrowed it down to the TMR1 interrupt not working perfectly. How can I tweak it to interrupt at...
D'oh! Enabling the USB interrupt before USBINIT was not one of my better ideas.
Step 1: I commented out everything except the LCD and sprinkled USBSERVICE everywhere it is recognized.
Step 2:...
Ok, I added the disable/enable at both assembler USB routines generated from HIDMaker but the device is not recognized. I rummaged through the datasheet for TMR1 and T1CON and found this:
...