Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Why is Mplab 5.20 a mess

Status
Not open for further replies.

be80be

Well-Known Member
Im trying to use the ADC and printF
and getting these errors
mp.png
 
Here the whole ball of wax
 

Attachments

  • adc.zip
    450.4 KB · Views: 173
It is so slow that it takes five minutes to get up to speed. Solution - drink more coffee.

Mike.
 
Ok the MCC is a great help in setting up the chip but it really sucks at giving errors.
 
Old school... IDE's appear to be the "new sliced bread" but if you have never handballed c code and linked on command line... You can't see the wood from the trees...

The problem here is ifdef.... Microchip trying to cater for every bloody chip they manufacture... Sloppy programmers cutting and pasting so there are different functions for each device...

Roll your own code.. I have written virtually every library I use... Even when I use MikroC I use my own libraries.. Sorry for the rant Burt!!!!
 
I know you all right I just don't get the fact that there own bull xxxx don't work i was doing the sample from there site
and there own code
Code:
printf("\n\rThe ADC Value is: %i ",ADCC_GetSingleConversion(channel_ANA4));
Gives a error
Then all them dumb errors come to life after that.
I'm thinking leave the MCC bull XXXX along and just dig in and do it all LOL
 
It's kind of like work I'm doing 5 car washes just opened one i did it was remodel.
I set up all the controls VFD's vale's for water and air and what's called a TCS which is a PLC controller
not a easy job when it's remodel.
Kind of like the MCC lol
But this the 6 one and it's sure nice to see the water and soap come on as the car moves down the line and the brush roll over the car.
with the mood lights coming on it's really cool.

I don't have much time to play with the pic chip but seem like i keep starting over with this MCC stuff.
Kind of like the car wash to get the job done I have to roll my own to get it done.
which i can.
I wish i had more time for C programming tho.
But I'm more of a hardware guy been wiring up motor controls and wiring for over 40 years now
 
I tend to use MCC to do the various settings, then strip the bits of code I want out :D

In particular it's valuable for setting the oscillator speed, which has a bewildering number of options.
 
I downloaded your zip file.
For whatever reason, the printf line came through with '?' instead of " when I made them quotes: printf("\n\rThe ADC Value is: %i ",ADCC_GetSingleConversion(channel_ANA4));
It built just fine - no errors at all. Of course I get a ton of warnings:

-Wl,--defsym=__MPLAB_BUILD=1 -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -Wl,--memorysummary,dist/default/production/memoryfile.xml -o dist/default/production/adc.production.elf build/default/production/mcc_generated_files/adcc.p1 build/default/production/mcc_generated_files/eusart1.p1 build/default/production/mcc_generated_files/device_config.p1 build/default/production/mcc_generated_files/mcc.p1 build/default/production/mcc_generated_files/pin_manager.p1 build/default/production/main.p1
mcc_generated_files/adcc.c:114:: warning: (520) function "_ADCC_StartConversion" is never called
mcc_generated_files/adcc.c:126:: warning: (520) function "_ADCC_IsConversionDone" is never called
mcc_generated_files/adcc.c:132:: warning: (520) function "_ADCC_GetConversionResult" is never called
mcc_generated_files/adcc.c:163:: warning: (520) function "_ADCC_StopConversion" is never called
mcc_generated_files/adcc.c:169:: warning: (520) function "_ADCC_SetStopOnInterrupt" is never called
mcc_generated_files/adcc.c:175:: warning: (520) function "_ADCC_DischargeSampleCapacitor" is never called
mcc_generated_files/adcc.c:181:: warning: (520) function "_ADCC_LoadAcquisitionRegister" is never called
mcc_generated_files/adcc.c:188:: warning: (520) function "_ADCC_SetPrechargeTime" is never called
mcc_generated_files/adcc.c:195:: warning: (520) function "_ADCC_SetRepeatCount" is never called
mcc_generated_files/adcc.c:201:: warning: (520) function "_ADCC_GetCurrentCountofConversions" is never called
mcc_generated_files/adcc.c:207:: warning: (520) function "_ADCC_ClearAccumulator" is never called
mcc_generated_files/adcc.c:213:: warning: (520) function "_ADCC_GetAccumulatorValue" is never called
mcc_generated_files/adcc.c:219:: warning: (520) function "_ADCC_HasAccumulatorOverflowed" is never called
mcc_generated_files/adcc.c:225:: warning: (520) function "_ADCC_GetFilterValue" is never called
mcc_generated_files/adcc.c:231:: warning: (520) function "_ADCC_GetPreviousResult" is never called
mcc_generated_files/adcc.c:237:: warning: (520) function "_ADCC_DefineSetPoint" is never called
mcc_generated_files/adcc.c:244:: warning: (520) function "_ADCC_SetUpperThreshold" is never called
mcc_generated_files/adcc.c:251:: warning: (520) function "_ADCC_SetLowerThreshold" is never called
mcc_generated_files/adcc.c:258:: warning: (520) function "_ADCC_GetErrorCalculation" is never called
mcc_generated_files/adcc.c:264:: warning: (520) function "_ADCC_EnableDoubleSampling" is never called
mcc_generated_files/adcc.c:270:: warning: (520) function "_ADCC_EnableContinuousConversion" is never called
mcc_generated_files/adcc.c:276:: warning: (520) function "_ADCC_DisableContinuousConversion" is never called
mcc_generated_files/adcc.c:282:: warning: (520) function "_ADCC_HasErrorCrossedUpperThreshold" is never called
mcc_generated_files/adcc.c:288:: warning: (520) function "_ADCC_HasErrorCrossedLowerThreshold" is never called
mcc_generated_files/adcc.c:294:: warning: (520) function "_ADCC_GetConversionStageStatus" is never called
mcc_generated_files/eusart1.c:93:: warning: (520) function "_EUSART1_is_tx_ready" is never called
mcc_generated_files/eusart1.c:98:: warning: (520) function "_EUSART1_is_rx_ready" is never called
mcc_generated_files/eusart1.c:103:: warning: (520) function "_EUSART1_is_tx_done" is never called
mcc_generated_files/eusart1.c:108:: warning: (520) function "_EUSART1_get_last_status" is never called
mcc_generated_files/eusart1.c:112:: warning: (520) function "_EUSART1_Read" is never called
mcc_generated_files/eusart1.c:140:: warning: (520) function "_getch" is never called
C:\Program Files (x86)\Microchip\xc8\v2.05\pic\sources\c99\common\nf_fputc.c:16:: warning: (1498) pointer (unknown) in expression may have no targets

But those seem legitimate as you are not calling those routines. The last warning (pointer) is probably a C99 issue.

Now, all that was with 5.15...I will dl 5.20 and let you know if it is different.

Edit: Finished installing 5.20, no difference although it gave me a configuration defaut error when MPLABXIDE loaded, which was resolved simply by specifying or re-specifying the compiler (c in the tool chain xc8 2.05).

be80be Are you getting errors or warnings? Also, I don't see where you are defining POT
 
Last edited:
Well i got a new computer so i downloaded everything new ive used this same code befor and it worked im going to get some new reading glasses my eyes bad from having my A1C at 13.5 for about a month
 
This is what it put in the adc.h
Code:
typedef enum
{
    POT =  0x4,
    channel_Vss =  0x3B,
    channel_Temp_Sensor =  0x3C,
    channel_DAC1_Output =  0x3D,
    channel_FVR_Buffer1 =  0x3E,
    channel_FVR_Buffer2 =  0x3F
} adcc_channel_t;

The Adc.c file is showing ton's of errors
guess i need go back on my mplab this 5.20 looks to be missing something.
Ok looks like I'm not alone with this problem
 
Last edited:
I had to put MCC into 5.20 - importing it from 5.15 (where I have the current version). A ballon should have popped up for a bit - do you remember having to do that step in 5.20?
 
No I installed all new and started a new project I just read where people was having same problem.
I just removed 5.20 and i'm now installing 5.15
 
Ok the problem is the printf
This just doesn't work
Code:
printf(?\n\rThe ADC Value is: %i   ?,ADCC_GetSingleConversion(POT));
I be dam lol
The problem was these ? should of been this "
Code:
printf("\n\r The ADC Value is: %i   ",ADCC_GetSingleConversion(POT));
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top