Home › FORUM › 2007-11 USB data-acquisitiekaart › Software correctie

FORUM

Log in om antwoord te posten of de notificatie-service te gebruiken.

Onderwerp: Software correctie

Author Post

thijsbeckers

1019 berichten

Expert¹
Expert¹

Read post 10-12-2007 13:30

Naar aanleiding van enkele problemen heeft de auteur nog eens naar de software gekeken. Hieruit is het volgende gebleken:

Contrary to what some readers have written there is no bug in the firmware CUSTOM_TAD. If it is compiled with MPLAB C18 C Compiler v3.02 as described in the magazine, in the section ‘PIC Firmware’, it compiles perfectly (6 warnings appear, without importance) and the .hex file is generated without problems.

However, if the firmware is compiled with a later version of the C18 Compiler, for instance, with MPLAB C18 C Compiler v3.14 (recent version), some errors appear that inhibit compilation. To be able to compile successfully, the following modifications must be made:

1. File main.c, line 52
Text: #pragma config FCMEM = OFF
Should be: #pragma config FCMEN = OFF

2. File user.c, line 76
Text: OpenPWM2(0xFF);
Should be: TRISCbits.TRISC1=0; CCP2CON=0b00001111;

3. File user.c, line 79
Text: OpenADC(ADC_FOSC_64 & ADC_RIGHT_JUST & ADC_6_TAD,ADC_CH0 & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS,7);
Should be: OpenADC(ADC_FOSC_64 & ADC_RIGHT_JUST & ADC_6_TAD,ADC_CH0 & ADC_INT_OFF & ADC_REF_VDD_VSS,7);

These tree changes are indispensable. After making the changes the firmware is compiled perfectly (6 warnings appear, without importance) and the .hex file is generated correctly.

To be able to execute the software for the PC it is necessary that Microsoft .NET Framework is installed (free downloaded from Microsoft via Windows Update).

Arjen H.

1077 berichten

Expert¹
Expert¹

Read post 10-12-2007 14:54

thijsbeckersHowever, if the firmware is compiled with a later version of the C18 Compiler, for instance, with MPLAB C18 C Compiler v3.14 (recent version), ...


Ik had versie 3.12 en die kent ADC_REF_VDD_VSS niet.
Updaten naar 3.14 dus...

Log in om antwoord te posten of de notificatie-service te gebruiken.

Abonnee worden

Aanmelden GRATIS nieuwsbrief E-Weekly

Vul uw e-mailadres in:
Payoff
Payoff

Volg ons ook op:

      

Direct doen

The School of Electronics

 

Elektor eVents, vakboeken, cursussen en meer. Kortom, innovatief studie- en onderwijsmateriaal met educatieve content!

Nu in prijs verlaagd

Elektor OSPV1

Tijdelijk € 210,- korting!

Dit zelfbalancerende indoor voertuig is ideaal voor bijvoorbeeld fabriekshal, magazijn of school.