Чт дек 21, 2017 10:59:45
Пт дек 22, 2017 17:20:40
#pragma config POSCMOD = HS
__CONFIG(/*тут все, что нам надо*/)
Пт дек 22, 2017 17:36:57
Пт дек 22, 2017 18:33:48
Пт дек 22, 2017 21:38:05
Сб дек 23, 2017 07:33:45
BUILD FAILED (exit value 2, total time: 1s)
Сб дек 23, 2017 09:48:59
BUILD FAILED (exit value 2, total time: 14s)
Сб дек 23, 2017 17:18:52
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: вход в каталог «/media/files/Dropbox/PIC/Chiken_Tmr.X»
make -f nbproject/Makefile-default.mk dist/default/production/Chiken_Tmr.X.production.hex
make[2]: вход в каталог «/media/files/Dropbox/PIC/Chiken_Tmr.X»
"/opt/microchip/xc16/v1.33/bin/xc16-gcc" Code.c -o build/default/production/Code.o -c -mcpu=24FJ64GA004 -MMD -MF "build/default/production/Code.o.d" -g -omf=elf -DXPRJ_default=default -legacy-libc -O0 -msmart-io=1 -Wall -msfr-warn=off
Code.c:34:6: warning: return type of 'main' is not 'int'
Code.c: In function 'main':
Code.c:38:5: warning: implicit declaration of function '__delay_ms'
"/opt/microchip/xc16/v1.33/bin/xc16-gcc" -o dist/default/production/Chiken_Tmr.X.production.elf build/default/production/Code.o -mcpu=24FJ64GA004 -omf=elf -DXPRJ_default=default -legacy-libc -Wl,,,--defsym=__MPLAB_BUILD=1,,--script=p24FJ64GA004.gld,--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="dist/default/production/Chiken_Tmr.X.production.map",--report-mem,--memorysummary,dist/default/production/memoryfile.xml
build/default/production/Code.o(.text+0xa): In function `_main':
: undefined reference to `___delay_ms'
make[2]: *** [dist/default/production/Chiken_Tmr.X.production.hex] Ошибка 255
make[1]: *** [.build-conf] Ошибка 2
make: *** [.build-impl] Ошибка 2
xc16-ld 1.33 (A)
Program Memory [Origin = 0x200, Length = 0xa9fc]
section address length (PC units) length (bytes) (dec)
------- ------- ---------- ----------
.text 0x200 0xce 0x135 (309)
.text 0x2ce 0x10 0x18 (24)
Total program memory used (bytes): 0x14d (333) <1%
Ivt Memory [Origin = 0x4, Length = 0xfc]
section address length (PC units) length (bytes) (dec)
------- ------- ---------- ----------
Data Memory [Origin = 0x800, Length = 0x2000]
section address alignment gaps total length (dec)
------- ------- ---------- ----------
Total data memory used (bytes): 0 (0)
Dynamic Memory Usage
region address maximum length (dec)
------ ------- ----------
heap 0 0 (0)
stack 0x800 0x2000 (8192)
Maximum dynamic memory (bytes): 0x2000 (8192)
/opt/microchip/xc16/v1.33/include$ ls
assert.h float.h math.h stdarg.h stdfix.h stdlib.h unixio.h
ctype.h lega-c setjmp.h stdbool.h stdint.h string.h
errno.h limits.h signal.h stddef.h stdio.h time.h
/opt/microchip/xc16/v1.33/include/lega-c$ ls
assert.h float.h setjmp.h stdbool.h stdio.h time.h
ctype.h limits.h signal.h stddef.h stdlib.h yvals.h
errno.h math.h stdarg.h stdint.h string.h
Сб дек 23, 2017 19:11:50
Вс дек 24, 2017 03:47:33
Ср дек 27, 2017 20:55:51
Ср дек 27, 2017 22:19:16
и затем либо моргаем этим диодом либо нет.
Можно использовать встроенный ИОН?
Для считывания показаний применять АЦП? (Нужно ли ставить делитель)
Чт дек 28, 2017 09:06:57
Чт дек 28, 2017 21:53:23
void blinkLED()
{
DDRB=(1<<DDB4) | (1<<DDB3);
PORTB=(0<<PORTB4) | (1<<PORTB3);
delay_ms(200);
DDRB=(0<<DDB4) | (0<<DDB3);
PORTB=(0<<PORTB4) | (0<<PORTB3);
delay_ms(100);
}
//----------
while (1)
{
// Place your code here
DDRB=(1<<DDB4) | (1<<DDB3);
PORTB=(1<<PORTB4) | (0<<PORTB3);
delay_ms(50);
DDRB=(0<<DDB4) | (1<<DDB3);
PORTB=(0<<PORTB4) | (0<<PORTB3);
for ( j = 0; j < 128000; j++) {
if (PINB.4 == 0) break;
}
if(j>4)
{
blinkLED();
}
delay_ms(300);
}
}
Ср янв 10, 2018 19:41:23
Чт янв 11, 2018 00:58:31
Чт янв 11, 2018 06:03:49
Пт янв 12, 2018 00:15:23
Пн янв 22, 2018 19:46:49
Пн янв 22, 2018 21:18:11