New PIC32 Series PIC32MZ2048ECH144

Post your requests and ideas on the future development of mikroC PRO for PIC32.
Author
Message
bpislife
Posts: 539
Joined: 11 Jun 2006 21:16
Location: Cumberland, RI

Re: New PIC32 Series PIC32MZ2048ECH144

#16 Post by bpislife » 24 Apr 2014 02:40

It has now been 13 months since the release. Any updates?

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: New PIC32 Series PIC32MZ2048ECH144

#17 Post by marina.petrovic » 24 Apr 2014 12:28

Hi,

I am afraid that I do not have any news yet, except that we are working on it.
Thank you for your patience.

Best regards,
Marina

josef2600
Posts: 94
Joined: 01 Jan 2012 03:26

Re: New PIC32 Series PIC32MZ2048ECH144

#18 Post by josef2600 » 09 May 2014 00:56

hi,
will libraries be fix ? there are few ( or moor :wink: ) bugs in libraries . for example on str and memory types etc.
and the ethernet librarie. it would be great to know that .
best regards, Josef

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: New PIC32 Series PIC32MZ2048ECH144

#19 Post by marina.petrovic » 09 May 2014 12:54

Hi,

Please, can you be more specific? On which bugs you refer?

We are doing our best to correct every problem and to implement every improvement (which is possible to implement)
which are users suggest to improve our compilers and software.

Best regards,
Marina

josef2600
Posts: 94
Joined: 01 Jan 2012 03:26

Re: New PIC32 Series PIC32MZ2048ECH144

#20 Post by josef2600 » 09 May 2014 23:18

hi,
thank for answering ! or attention, is better.
i have mentioned a few before and i got no answers. but i have a very very bigger question for me and everyone in mk.
is it possible some day you support your compiler like mplab from microchip for languages ? specially for assembly and c++ full ? and i say is this possible ? and if yes ; please say when ? like 6 mounts ? 1 year ? 2 ...
and if it is not, please be kind ( warm-hearted :P )and tell us why, in technical terms.
thanks.
best regards, Josef

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: New PIC32 Series PIC32MZ2048ECH144

#21 Post by marina.petrovic » 12 May 2014 14:26

Hi,

Our compiler allows embedding assembly in the source code by means of the asm statement - asm block
and at this moment we do not have in our plans developing full assemble compiler.

Regarding C++ compiler, on our forum you can find many topics related with this question,
and also, answers of some of our users and some of my colleagues.

For example, please, take a look at this forum topic:
http://www.mikroe.com/forum/viewtopic.php?f=166&t=55311

Best regards,
Marina

bpislife
Posts: 539
Joined: 11 Jun 2006 21:16
Location: Cumberland, RI

Re: New PIC32 Series PIC32MZ2048ECH144

#22 Post by bpislife » 30 Jul 2014 00:03

How about now? Any update on when the PIC32 C compiler will be updated? We are now at a 16 month release.

mefleming55
Posts: 55
Joined: 27 Dec 2006 23:16
Location: Portland, Oregon, Earth
Contact:

Re: New PIC32 Series PIC32MZ2048ECH144

#23 Post by mefleming55 » 29 Aug 2014 02:14

The PIC32MZ is an amazing machine, and we love your compilers, please help us plan by some indication of when MicroC will support the PIC32Mz?

6 Months?
12 Months?
24 Months?

We're dying here :( :( :(
http://www.micro2cloud.com

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: New PIC32 Series PIC32MZ2048ECH144

#24 Post by marina.petrovic » 29 Aug 2014 09:51

Hi,

At this moment our software developers are working on new PIC32 compilers release.

Thank you for your understanding and your patience.

Best regards,
Marina Petrovic

josef2600
Posts: 94
Joined: 01 Jan 2012 03:26

Re: New PIC32 Series PIC32MZ2048ECH144

#25 Post by josef2600 » 08 Nov 2014 02:59

for example on str and memory types etc.
and the ethernet librarie. it would be great to know that .
marina.petrovic wrote:Hi,

Please, can you be more specific? On which bugs you refer?

We are doing our best to correct every problem and to implement every improvement (which is possible to implement)
which are users suggest to improve our compilers and software.

Best regards,
Marina
sorry, i forgot at that time, this is a problem itself ! its a very big site and users some times forget to answer, there should be a message to alarm them when the post was answered.
for that Ethernet lib, micro was hanging alot, and the password was unstable and easily hacked. after that time when i was checking again after few month i learned the java source code and the other source code that you put in the library, ( you did not check the code and just copy-past it from the source web ) had several errors. i was able to fix it after few days, unfortunately i don't remember what was it. you should have some people for that, because im not a java and php programmer and i got lucky !
------------------------
in another matter, there is a very bad glitch in your registering codes, specially in ADC. i was working on a smps with 30f2020 and i wanted the fast speed of ADC. i did set the registries, but the max speed that i could get was 14k sample, instead of 500ks ! and now i have to do it with pic32mx460. i hope it works this time with fifo . i cant use you ADC_READ , AND i dont know why ?!
is this enough for you to start checking your libs ?

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: New PIC32 Series PIC32MZ2048ECH144

#26 Post by marina.petrovic » 10 Nov 2014 14:22

Hi,

Thank you very much for more detail explanation, we really appreciate it.
Our software developers will certainly consider to revise Ethernet library (and also add some more detailed documentation).

Regarding ADC library: it is a very simple library, but of course it is not excluded that an error can occurs.

Like I mentioned in one of my previous answer, we are doing our best to correct every problem and to implement every improvement which is possible to implement in our compiler libraries.
It is hard to reproduce the error if I do not have the same hardware which you use (and code which you tested),
so we usually ask our users to send us some small project which represent problem which they have so we can try to find source of the problem as quickly as possible.

Of course, we are testing our libraries, but unfortunately it is not possible to test them with every supported MCU and also we are not able to predict every situation. Because of that we really appreciate any assistance which we receive from our users.

Best regards,
Marina

josef2600
Posts: 94
Joined: 01 Jan 2012 03:26

Re: New PIC32 Series PIC32MZ2048ECH144

#27 Post by josef2600 » 15 Nov 2014 18:30

marina.petrovic wrote:Hi,

Thank you very much for more detail explanation, we really appreciate it.
Our software developers will certainly consider to revise Ethernet library (and also add some more detailed documentation).

Regarding ADC library: it is a very simple library, but of course it is not excluded that an error can occurs.

Like I mentioned in one of my previous answer, we are doing our best to correct every problem and to implement every improvement which is possible to implement in our compiler libraries.
It is hard to reproduce the error if I do not have the same hardware which you use (and code which you tested),
so we usually ask our users to send us some small project which represent problem which they have so we can try to find source of the problem as quickly as possible.

Of course, we are testing our libraries, but unfortunately it is not possible to test them with every supported MCU and also we are not able to predict every situation. Because of that we really appreciate any assistance which we receive from our users.

Best regards,
Marina
i have a very simple test code, please test the speed of ADC in pic30f2020 :

Code: Select all

#define            Reference_clock   14.55e6
#define            PLL_Multiply      32
#define          FALSE       0
#define          TRUE        1
#define            G_PWM_FREQUENCY     100.0e3
#define            PWM_PERIOD  ((Reference_clock * PLL_Multiply * 2)/(G_PWM_FREQUENCY ))
#define            PWM_PDC1_MIN  (380)
#define            PWM_PDC1_MAX  (PWM_PERIOD-32)
#define            PWM_div_1024  (PWM_PERIOD/1024)
#define            PWM_DUTY_ADC   (PWM_PERIOD/1024) //(0.5*(PWM_PERIOD))
#define            B1_RE_DEADTIME   (200 / 1.04)
#define            B1_FE_DEADTIME   (200 / 1.04)
#define     B1_OVR_TRIP_LEVEL       ( 1.0 )
#define     CMP_REFERENCE      2.5
#define     B1_OVR_THRESHOLD   ((1024*(B1_OVR_TRIP_LEVEL / CMP_REFERENCE))-1)
.
.
.

  char txt1[16] ;
  char txt2[16] ;
  char bittt ;
  unsigned int  channe_R ;
  //float  channe_float ;
  unsigned short  test_adc_buff_1 ;
  unsigned short  test_adc_buff_2 ;

void ADC_read_intrupt() iv IVT_ADDR_ADCINTERRUPT ics ICS_AUTO {
        /* AD Conversion complete interrupt handler */
        ADSTAT = 0; // Clear the ADSTAT register */
        IFS0bits.ADIF = 0; /* Clear ADC Interrupt Flag*/
    bittt=1;
   channe_R = 1024-(ADCBUF2);
   PDC1 = (channe_R)*(PWM_PERIOD/1024);
   ADCPC0bits.SWTRG1 = 1;   //Start conversion of channels AN3 and AN2.
}


void init_Interrupt_functions() {

  SR = 0; // Status Register (in CPU)
  CORCON = 0;  // Core Control Register
  INTCON1 = 0; // Interrupt Control Register 1
  INTCON2 = 0; // Interrupt Control Register 2
  IFS0 = 0; // Interrupt Flag Status Register 0
  IFS1 = 0; // Interrupt Flag Status Register 1
  IFS2 = 0; // Interrupt Flag Status Register 2
  IEC0 = 0; // Interrupt Enable Control Register 0
  IEC1 = 0; // Interrupt Enable Control Register 1
  IEC2 = 0; // Interrupt Enable Control Register 2
  IPC0 = 0; // Interrupt Priority Control Register 0
  IPC1 = 0; // Interrupt Priority Control Register 1
  IPC2 = 0; // Interrupt Priority Control Register 2
  IPC3 = 0; // Interrupt Priority Control Register 3
  IPC4 = 0; // Interrupt Priority Control Register 4
  IPC5 = 0; // Interrupt Priority Control Register 5
  IPC6 = 0; // Interrupt Priority Control Register 6
  IPC7 = 0; // Interrupt Priority Control Register 7
  IPC8 = 0; // Interrupt Priority Control Register 8
  IPC9 = 0; // Interrupt Priority Control Register 9
  IPC10 = 0; // Interrupt Priority Control Register 10
  INTTREG = 0; // Interrupt Control and Status Register

}



void init_ADC_functions() {

        ADC1_Init();
        ADON_bit = 0;

        ADCONbits.ADSIDL    = 0;// Operate in Idle Mode */
        ADCONbits.GSWTRG    = 0;// Global Software Trigger bit
        ADCONbits.FORM      = 0;// Output in Integer Format - (DOUT = 0000 00dd dddd dddd)*/
        ADCONbits.EIE       = 0;// No Early Interrupt-ADCONbiInterrupt is generated after second conversion is completed
        ADCONbits.ORDER     = 0;// Even channel first */
        ADCONbits.SEQSAMP   = 1;// Sequential Sampling Enabled */
        ADCONbits.ADCS      = 5;// Clock Divider is set up for Fadc/14 */

        ADSTAT = 0; // Clear the ADSTAT register */

      //  ADBASE = 0; //

        ADPCFG = 0; // all analog inputs  /* 0xFFFC = AN0 and AN1 are analog inputs */

        ADCPC0bits.IRQEN1    = 0;   // Enable the interrupt
        ADCPC0bits.SWTRG1    = 1;   //Start conversion of channels AN3 and AN2 (if TRGSRC1 = 00001).
        ADCPC0bits.TRGSRC1   = 0b01100; //Trigger conversion on TMR1 Prd Match for AN3 and AN2

        ADCPC1 = 0; // AN5 and AN4 - AN7 and AN6
        /* Enable ADC  */
        ADCONbits.ADON = 1;/* Start the ADC module */
}



void Ports_init_functions(void) {

        // PWM1L, PWM1H: init individual pin value
        LATe.b0 = 0;                                                                                                // PWM1L = 1 [to keep Vout = 0]
        LATe.b1 = 0;                                                                                                // PWM1H = 0
        // PWM1L, PWM1H: init PWM output pins as output
        TRISe.b0 = 0;
        TRISe.b1 = 0;
}





void PWM_Init_functions(void) {

        PTCON = 1;// PTCON: PWM Time Base Control Register-PWM Special Event Trigger Output Postscale 1:2
        PTCONbits.EIPU = 1; // Active Period register is updated immediately

        PTPER = PWM_PERIOD; // PTPER: PWM Master Time Base Register

        SEVTCMP = 0; // SEVTCMP: PWM Special Event Compare Register

        MDC = 8;  // MDC: PWM Master Duty Cycle Register

        PWMCON1bits.FLTIEN = 0;  // Fault interrupt disabled and FLTSTAT bit is cleared
        PWMCON1bits.CLIEN = 0;  // Current-limit interrupt enabled
        PWMCON1bits.TRGIEN = 0;  // Trigger event interrupts are disabled and TRGSTAT bit is cleared
        PWMCON1bits.ITB = 0;  // PTPER based operation -Primary time base provides timing for this PWM generator
        PWMCON1bits.MDCS = 0; // PDCx register provides duty cycle information for this PWM generator
        PWMCON1bits.DTC = 0;  // Positive dead-time actively applied for all output modes
        PWMCON1bits.XPRES = 0;  // External PWM Reset Control bit
        PWMCON1bits.IUE = 0;
        //0= Updates to the active PDC registers are synchronized to the PWM time base

        PDC1 = (0.5*(PWM_PERIOD)); //To achieve a duty cycle of 50%, we choose the PDC1 value = 0.5*(PWM Period)

        PHASE1 = 0;

        DTR1 = B1_RE_DEADTIME;  // DTRx: PWM Dead Time Register

        ALTDTR1 = B1_FE_DEADTIME; // ALTDTRx: PWM Alternate Dead Time Register

        TRGCON1 = 0; //PWM TRIGGER Control Register
        TRGCON1bits.TRGDIV = 3;   // trigger every 4th trigger event
        TRGCON1bits.TRGSTRT = 0;  // wait 0 pwm cycles to generate trigger

        IOCON1 = 0;    //PWM I/O Control Register
        IOCON1bits.PENH = 1;
        IOCON1bits.PENL = 1;
        IOCON1bits.POLH = 0;       // PWM H output active high
        IOCON1bits.POLL = 0;       // PWM L output active high
        IOCON1bits.PMOD = 2;       // Select Push-Pull Output mode
        IOCON1bits.FLTDAT = 0;  // 1H = low; 1L = low

        FCLCON1bits.CLSRC = 0; //Current-Limit Control Signal Source Analog Comparator 1
        FCLCON1bits.CLPOL = 0; // current-limit source is active-high
        FCLCON1bits.CLMODE = 1; // Current-Limit mode is enabled
        FCLCON1bits.FLTSRC = 0;    // fault source is Comparator 1
        FCLCON1bits.FLTPOL = 0;    // fault source is active high
        FCLCON1bits.FLTMOD = 3; //The selected Fault source forces PWMxH/PWMxL pins to FLTDAT values (cycle)

        TRIG1 = 0;   //PWM Trigger Compare Value Register

        LEBCON1 = 0; //Leading Edge Blanking Control Register
        LEBCON1bits.PHR = 1;    // Rising edge of PWMxH will trigger Leading-Edge Blanking counter
        LEBCON1bits.PHF = 0;    // PWMxH Falling Edge Trigger
        LEBCON1bits.PLR = 1;    // Rising edge of PWMxL will trigger Leading-Edge Blanking counter
        LEBCON1bits.PLF = 0;    // PWMxL Falling Edge Trigger Enable bit
        LEBCON1bits.FLTLEBEN = 0; //Fault Input Leading-Edge Blanking Enable bit
        LEBCON1bits.CLLEBEN = 1; //Current-Limit Leading-Edge Blanking Enable bit
        LEBCON1bits.LEB = 8;    //Leading-Edge Blanking for Current-Limit and
                                //Fault Inputs bits Value is 8 ns increments.

}

.
.
.
void main() {
 while(OSCCONbits.COSC != 0b001);/* Wait for new Oscillator to become FRC w/ PLL */
 while(OSCCONbits.LOCK!=1) {};  // Wait for PLL to Lock


  trisa = 255;
  trisb = 255;
  trisd = 0;
  trise = 0;
  trisf = 0;

     Lcd_Init();
     Lcd_Cmd(_LCD_CURSOR_OFF);
     delay_ms(300);
     
        init_ADC_functions();
        Ports_init_functions();                                                                                                                        // init I/O ports
        Comparator_init_functions();
        init_Timerr1();
        PWM_Init_functions();                                                                                                                                // init PWM1

        CMPCON1bits.CMPON = 1;        // Comparator module is enabled                                                                                                              // Init Fault in cycle by cycle mode
        PTCONbits.PTEN = 1;        // start the PWM operation



  sttt:

   // PDC1=((0.5)*(PWM_PERIOD)) ;

    bittt=0;



   delay_ms(300);

  Lcd_Cmd(_LCD_CLEAR);

   inttostr(bittt,txt1);
   inttostr(channe_R,txt2);
   Lcd_Out(1,1,txt1);                 // Write text in first row
   Lcd_Out(2,1,txt2);                 // Write text in second row


  goto sttt;

for simple: freq=60mhz
smps mode: Multi-Phase.

just check the simple ADC work.

best regards, Josef.

Post Reply

Return to “mikroC PRO for PIC32 Wish List”