I have.
But they haven't been tested very thoroughly..
The update also includes every interrupt source I could find for 14-bit cores. (including F1's).
This page shows the added sources.
If you use the menu on the left, it will take you back to the old version. So don't.
http://www.darreltaylor.com/DT_INTS-14/intro2.html
Download the file at the bottom of the page. Not the one from the Download page.
DT_INTS-14 version 1.0
Woohoo! It's 1.0 finally.
But consider it still beta.
DT
I like smiling faces!
Amazing! Thanks.
I have to test them on the new PICs. Wonder whenthey are coming...
Ioannis
Hey Darrel--
I've been trying to reach you re: the consulting I'd hired you to do. I've sent three emails with no response. If you need more money, I'm happy to pay it, and you also have $2200 of my company's equipment... won't you please reply to me?
Thanks--
--Alan McFarland
www.nila.tv
That's just wrong, on so many levels.
I have no Public response. But I will leave this post here.
<br>
DT
I have a small test board that has an ICSP and a USB connection to a pic 18f4550. I have a reset button on the MCLR and a second button on portb.1. An led is connected to portb.0
The ICSP is used to program a bootloader onto the chip. Then USB is used to add the user program.
I have loaded the Diolan bootloader onto this chip and it is working.
I can make a test program in PBP 2.6 that flashes the LED on port b.0
like this: The Bootloader required code to start at 0x800
The above program works as expected. So the next step was to try the DT_INTS-18 with the bootloader...the code appears to load into the PIC fine, but after reset there is a pause of about 5 seconds then the chip shows up as an un-recognized USB device but does not enter the bootloader mode. To enter bootloader mode the PB on portb.1 is held down during power-on/reset. OR the user application can branch to 0x0016.Code:DEFINE OSC 48 DEFINE RESET_ORG 0x800 ' Example program to blink an LED connected to PORTB.0 about ' once a second Main: High 0 ' Turn on LED connected to PORTB.0 Pause 500 ' Delay for .5 seconds Low 0 ' Turn off LED connected to PORTB.0 Pause 500 ' Delay for .5 seconds Goto Main ' Go back to loop and blink LED forever End
It appears the program is branching somewhere to restart the bootloader code since the pic shows up as an unrecognized USB device. It should not show up at all after the code is loaded since I don't have any usb code in the user app listed below.
Here is my test program with the DT_INTS-18 that is not working...
Code:DEFINE OSC 20 DEFINE RESET_ORG 0x800 INCLUDE "DT_INTS-18.bas" ' Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts LED1 VAR PORTB.0 ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts Main: PAUSE 1 GOTO Main '---[TMR1 - interrupt handler]-------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN
Any thoughts on why it's not blinking the led using the DT_INTS-18 code and running off into la la land?
ADDED: I am using the MPASM assembler as well.
Thanks
Tom
Last edited by vamtbrider; - 25th March 2010 at 20:28. Reason: Added Assembler info
I added the port configuration and acon register configs. That has an effect...
The bootloader never leaves the bootloader mode to run the user app.
if I comment out the Hardware configuration section and compile I can load the code via the bootloader, the device disappears from the USB list and then ~10seconds later I get the USB device not recognized.
I have reloaded the led test program just to make sure the bootloader and chip are still working and they are. Very puzzling, but the registers do seem to have an effect.
Nothing in the DT_INT writes to EEPROM 0x00? If there is a 5A there then the bootloader thinks its still in boot mode.
Still puzzled...Code:LED1 VAR PORTB.0 DEFINE OSC 20 DEFINE RESET_ORG 0x800 INCLUDE "DT_INTS-18.bas" ' Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts ' Hardware configuration ' ====================== ' ' I/O and PORTs ' ------------- PORTB = 0 PORTC = 0 PORTD = 0 PORTE = 0 TRISB = %00000000 '<2-1> Inputs TRISC = 0 TRISA = 0 TRISD = 0 TRISE = 0 ' ' A/D converter ' ------------- ADCON0 = %00000000 ' A/D converter off ADCON1 = %00001111 ' All Digital Inputs ' ADCON2 = %00000000 ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts Main: Pause 10 GOTO Main '---[TMR1 - interrupt handler]-------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN
This hardware config give the same results as the original issue...ie the LED does not blink and the code appears to run off into la la land. Not sure how it is being detected as a usb device with the DT_INTS-18 code.
I have two port b pins connected together as part of the ICSP and 2 others connected for inputs off a single PB. Setting the TRISB to FE is what got me back to the original problem.Code:' Hardware configuration ' ====================== ' ' I/O and PORTs ' ------------- PORTB = 0 PORTC = 0 PORTD = 0 PORTE = 0 TRISB = %11111110 '<7:1> Inputs TRISC = 0 TRISA = 0 TRISD = 0 TRISE = 0 ' ' A/D converter ' ------------- ADCON0 = %00000000 ' A/D converter off ADCON1 = %00001111 ' All Digital Inputs ADCON2 = %00000000
I've never used this loader, but I did take a quick peek at the source files.
Try this;
Remove power. Place a jumper from PORTE.0 to ground. Power up & load the above after compiling it.Code:DEFINE OSC 20 DEFINE RESET_ORG 0x800 INCLUDE "DT_INTS-18.bas" ' Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts LED1 VAR PORTB.0 ' Hardware configuration ' ====================== ADCON1 = %00001111 ' All Digital Inputs ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts Main: Pause 10 GOTO Main '---[TMR1 - interrupt handler]-------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN
After programming it with the loader, power down. Move the jumper on PORTE.0 to Vcc, and power up.
Does it work now?
Thanks for the help Darrel.
I will look into it further. I had initialized stepcount to 32, then later to 8. Seems to get stuck after about two flashes of the led's.
Walter
Is there a way to use an assembly lookup table from within a DT INTS ASM interupt? When I try, the interrupt locks up on me. If I comment out the CALL SineTable, all is fine. I have tried it a few different ways, but no go so far.
Code:INCLUDE "DT_INTS-18.bas" ; Base Interrupt System LOW LED1 high led2 ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, ToggleLED1, ASM, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts Main: @ NOP GOTO Main '---[TMR1_INT - interrupt handler]------------------------------------------ ASM ToggleLED1 btg _LED1 ; toggle the pin btg _LED2 StepLoop movf _STEPCOUNT,W ; Pass table offset via W call SineTable ; Get table value movwf CCPR1L decfsz _STEPCOUNT,F ; Next step goto $+6 movlw d'32' movwf _STEPCOUNT ;_STEPCOUNT ; Load counter for 32 steps NOP NOP NOP NOP INT_RETURN SineTable addwf WREG ;added for pic18f each address is 16 bits addwf PCL,F retlw d'0' ; Dummy table value retlw d'128' ; 0 degree, 2.5 volt retlw d'148' retlw d'167' retlw d'185' retlw d'200' retlw d'213' retlw d'222' retlw d'228' retlw d'230' ; 90 degree, 4.5 volt retlw d'228' retlw d'222' retlw d'213' retlw d'200' retlw d'185' retlw d'167' retlw d'148' retlw d'128' ; 180 degree, 2.5 volt retlw d'108' retlw d'89' retlw d'71' retlw d'56' retlw d'43' retlw d'34' retlw d'28' retlw d'26' ; 270 degree, 0.5 volt retlw d'28' retlw d'34' retlw d'43' retlw d'56' retlw d'71' retlw d'89' retlw d'108' ENDASM
You should be able to do that.
But I think you need to initialize the STEPCOUNT variable, or put a CLEAR at the top.
If it powers up with a value higher than 32, the table jump will throw it outside of the interrupt code.
hth,
DT
Hi,
I´m not being able to access Darrell´s website to download DT_INTS-14 (I already use INTS-18, which is great, but I´m working on a project which runs on a 16F628A this time). Can someone please attach the latest version of both INTS-14 and INTS-18 to this thread, so people can download even if the site is down?
Thanks!
Here is the latest version 1.00 of DT_INTS-14. The link is to is site, which is back up. http://www.darreltaylor.com/DT_INTS-14/NEW_DT_INTS.zip
More info on above:http://darreltaylor.com/DT_INTS-14/intro2.html
Older version of above:http://darreltaylor.com/DT_INTS-14/intro.html
and here is the latest version of DT_INTS-18 http://www.picbasic.co.uk/forum/showthread.php?p=82871
More info on DTS_INTS-18: http://darreltaylor.com/DT_INTS-18/home.html
Besides the webpages above, this post contains info about the time re-enter takes, which I did not see details of on Darrel's site.
http://www.picbasic.co.uk/forum/show...7587#post17587
Last edited by ScaleRobotics; - 6th February 2010 at 16:40.
Thanks. Now only the only file I still need is elapsed_int-14. Could you please upload that one as well?
Thanks again!
I think the latest version of that is still this one: http://www.picbasic.co.uk/forum/show...7473#post17473
Bookmarks