Re: Mikro C PIC - string - problém
Andrej Jancura
aj.hwlist na gmail.com
Pátek Leden 17 10:22:37 CET 2014
Dobry den,
rychla pomoc, second service...
Skuste prosim vyhodit cely ten if ... endif, pretoze nemate nikde
zadefinovany __XC flag. Podla mna by malo stacit nasledovne
#include <xc.h> /* XC8 General Include File */
#include <stdint.h> /* For uint8_t definition */
#include <stdbool.h> /* For true/false definition */
#include "system.h" /* System funct/params, like osc/peripheral
config */
#include "user.h" /* User funct/params, such as InitApp */
...
Alebo si precitajte manual...
A.
2014/1/16 Jan Půhoný <konference na puhy.cz>
> Já jsem právě použil průvodce na vytvoření projektu, proto mě překvapilo,
> že to nejde přeložit...díky moc za Vači trpělivost ...
>
> v main.c mám toto:
>
>
>
> /******************************************************************************/
> /* Files to Include
> */
>
> /******************************************************************************/
>
> #if defined(__XC)
> #include <xc.h> /* XC8 General Include File */
> #elif defined(HI_TECH_C)
> #include <htc.h> /* HiTech General Include File */
> #elif defined(__18CXX)
> #include <p18cxxx.h> /* C18 General Include File */
> #endif
>
> #if defined(__XC) || defined(HI_TECH_C)
>
> #include <stdint.h> /* For uint8_t definition */
> #include <stdbool.h> /* For true/false definition */
>
> #endif
>
> #include "system.h" /* System funct/params, like osc/peripheral
> config */
> #include "user.h" /* User funct/params, such as InitApp */
>
>
>
> #define _XTAL_FREQ=20000000
>
>
>
>
> /******************************************************************************/
> /* User Global Variable Declaration
> */
>
> /******************************************************************************/
>
> /* i.e. uint8_t <variable_name>; */
>
>
> /******************************************************************************/
> /* Main Program
> */
>
> /******************************************************************************/
>
> void main(void)
> {
> /* Configure the oscillator for the device */
> ConfigureOscillator();
>
> /* Initialize I/O and Peripherals for application */
> InitApp();
>
> /* TODO <INSERT USER APPLICATION CODE HERE> */
>
> while(1)
> {
>
> PORTD=0xFF;
>
> __delay_ms(1);
>
> PORTD=0x00;
>
> __delay_ms(1);
>
> }
>
> }
>
>
>
------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://list.hw.cz/pipermail/hw-list/attachments/20140117/89e840a8/attachment.html>
Další informace o konferenci Hw-list