test with dspic33FJ128MC802 [solved] - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 16-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=6) +--- Thread: test with dspic33FJ128MC802 [solved] (/showthread.php?tid=446) |
test with dspic33FJ128MC802 [solved] - Mgros - 2011-11-08 Sorry for my poor English ^^... By the way thank you to the developers as DS30 loader... Before sending any we will start from the beginning … I chose my pic Code: ;------------------------------------------------------------------------------ Quartz 10Mhz PLL configuration PLLPRE -> 5Mhz; VC0 -> 160Mhz ; PLLPOST -> 80Mhz Fcy=Fosc/2 = 80 000 000/2 = 40 000 000 = 40Mhz My FCY is it false? Code: ;------------------------------------------------------------------------------ I want to use the UART1 ... And I use on my dsPIC Peripheral Pin Select Registers .... ;RPINR18bits.U1RXR = 10; //U1RX RB10/RP10 ;RPOR5bits.RP11R = 3; //U1TX RB11 (=3 veut dire fonction TX) we must use USE_ALTIO? Code: ;------------------------------------------------------------------------------ Here if it does not work after I will post answer worth following @ + thank you RE: test with dspic33FJ128MC802 - Mikael Gustavsson - 2011-11-08 Hi, You will need to add code to configure PLL. You can do that in this section in ds30loader.s: Code: ;------------------------------------------------------------------------------ You also need to modify the PPS template in ds30loader.s Finally you need to configure the configuration bits. If haven't done so already, read the manuals. From the manual Quote:USE_ALTIO RE: test with dspic33FJ128MC802 - Mgros - 2011-11-08 Code: So to configure the PLL I tried to write just after What is good writing? for PPS I had configured like this: U1RX -> RPINR18 -> RP10 = 10 RPINR18bits.U1RXR = 10; //U1RX RB10/RP10 RP11 on RPOR5 -> U1TX = 3 RPOR5bits.RP11R = 3; //U1TX RB11/RP11 For information ... This configuration will work for my current program Code: ;---------------------------------------------------------------------- Really thank you for the help @+ RE: test with dspic33FJ128MC802 - Mikael Gustavsson - 2011-11-14 The ds30 Loader free edition firmware is written in assembler. Your configuration code also need to be written in assembler. You can read the other code and the Microchip documentation to understand how it is done. RE: test with dspic33FJ128MC802 - Mgros - 2011-11-15 Well received ... Now I understand better now ... I could try again in several weeks ... I repost here if I go into the configuration ... thank you again ... RE: test with dspic33FJ128MC802 - Mgros - 2012-04-26 Hello again blocked ... my setup that works with my program CLKDIVbits.PLLPRE = 0; PLLFBDbits.PLLDIV = 30; CLKDIVbits.PLLPOST = 0; In firmware ds30loader I wrote as Code: ; *** START FOR MODIFICATION GLUONPILOT *** I also added a ca in the "User Specific entry" to see if my program is running well Code: ; TEST LED Lighting My output is activated but I have nothing on the UART1 In your opinion what I should look? I put in my code link you never know ... thank you http://dl.free.fr/eU5VULYcK RE: test with dspic33FJ128MC802 - Mikael Gustavsson - 2012-04-27 That looks ok. But you should use the register names: Code: clr W0 I am not able to download the file. Please use an English site or attached the file to a forum post. RE: test with dspic33FJ128MC802 - Mgros - 2012-04-28 Well thank you ca still does not work but I continued to search ... And here's the code ... thank you to soon edit: The part below is for she parameterize dsPIC33? or is it just you setting pins by UART / CAN "PPS" configuration Code: . USE_TXENABLE equiv, 1; xxx uncomment to use a tx enable pin RE: test with dspic33FJ128MC802 - Mgros - 2012-04-29 I tried with firmware ds30_Loader_120325 ... Now the detection of PIC with the GUI is ... The transfer seems to be too ... Code: Initiating write ... The program I have loaded does not execute correctly .. I have the "interrupt" of my TIMER1 that does not execute when my TIMER 2 and 3 apparently no problem... for example I can blink an LED ... For information I use mikroC compiler ... thank you to soon ... RE: test with dspic33FJ128MC802 - Mgros - 2012-05-07 Well the timer1 does not work ... but others 2,3,4 and 5 is good ... So I post my code if it can help someone ... For information I use a 10Mhz crystal and the bootloader for UART1 on pins RB10 (RX) and RB11 (TX) ... Thank you again for this really effective bootloader @ + RE: test with dspic33FJ128MC802 - Mikael Gustavsson - 2012-05-08 How do you configure timer1? RE: test with dspic33FJ128MC802 - Mgros - 2012-05-09 With my C compiler Code: //IPC0bits.T1IP = 0; //T1IP<2:0>: Timer1 Interrupt Priority bits 111 = Interrupt is priority 7 (highest priority interrupt) and here is what he does in assembler Code: ;Robot#3.c,1408 :: IEC0bits.T1IE = 1; //T1IE: Timer1 Interrupt Enable bit And when I use the interrupt Code: void T1Interrupt() iv IVT_ADDR_T1INTERRUPT{ And when I use the interrupt in asm Code: ;Robot#3.c,574 :: void T1Interrupt() iv IVT_ADDR_T1INTERRUPT{ Thank you for the attention ... and see you soon ... bye and sorry for my english again ^^ RE: test with dspic33FJ128MC802 - Mikael Gustavsson - 2012-05-14 You need to assigne an interrupt priority that is higher than the core priority. |